regexp-map
Curried function which takes a map of
RegExp
string keys which when successfully matched given string, resolves to mapped value.
npm install regexp-map --save
You can also use Duo, Bower or download the files manually.
npm stats
API Example
var remap = var makes = //=> 'Toyota'
API
remap(map, str)
arguments
map (Object.<string, string>)
Map ofRegExp
strings which when matched against string successfully, resolves to mapped value.str (String)
String to search.
returns
(String)
When matched returns corresponding mapped value; otherwise, an empty string.
Contributing
SEE: contributing.md