Mario Romano 29df96a085 react app
2016-04-06 17:52:19 +01:00

8 lines
227 B
JavaScript

module.exports = function(regExp, replace){
var replacer = replace === Object(replace) ? function(part){
return replace[part];
} : replace;
return function(it){
return String(it).replace(regExp, replacer);
};
};