summaryrefslogtreecommitdiff
path: root/bin/wiki/ImportarDesdeURL/node_modules/titleize/index.js
diff options
context:
space:
mode:
Diffstat (limited to 'bin/wiki/ImportarDesdeURL/node_modules/titleize/index.js')
-rw-r--r--bin/wiki/ImportarDesdeURL/node_modules/titleize/index.js10
1 files changed, 10 insertions, 0 deletions
diff --git a/bin/wiki/ImportarDesdeURL/node_modules/titleize/index.js b/bin/wiki/ImportarDesdeURL/node_modules/titleize/index.js
new file mode 100644
index 00000000..ff0acfd3
--- /dev/null
+++ b/bin/wiki/ImportarDesdeURL/node_modules/titleize/index.js
@@ -0,0 +1,10 @@
+'use strict';
+module.exports = function (str) {
+ if (typeof str !== 'string') {
+ throw new TypeError('Expected a string');
+ }
+
+ return str.toLowerCase().replace(/(?:^|\s|-)\S/g, function (m) {
+ return m.toUpperCase();
+ });
+};