Version 1
[yaffs-website] / node_modules / underscore.string / titleize.js
diff --git a/node_modules/underscore.string/titleize.js b/node_modules/underscore.string/titleize.js
new file mode 100644 (file)
index 0000000..c4a8a47
--- /dev/null
@@ -0,0 +1,7 @@
+var makeString = require('./helper/makeString');
+
+module.exports = function titleize(str) {
+  return makeString(str).toLowerCase().replace(/(?:^|\s|-)\S/g, function(c) {
+    return c.toUpperCase();
+  });
+};