Version 1
[yaffs-website] / node_modules / underscore.string / map.js
diff --git a/node_modules/underscore.string/map.js b/node_modules/underscore.string/map.js
new file mode 100644 (file)
index 0000000..c2910ae
--- /dev/null
@@ -0,0 +1,9 @@
+var makeString = require('./helper/makeString');
+
+module.exports = function(str, callback) {
+  str = makeString(str);
+
+  if (str.length === 0 || typeof callback !== 'function') return str;
+
+  return str.replace(/./g, callback);
+};