summaryrefslogtreecommitdiff
path: root/bin/wiki/ImportarDesdeURL/node_modules/decamelize/index.js
diff options
context:
space:
mode:
Diffstat (limited to 'bin/wiki/ImportarDesdeURL/node_modules/decamelize/index.js')
-rw-r--r--bin/wiki/ImportarDesdeURL/node_modules/decamelize/index.js13
1 files changed, 13 insertions, 0 deletions
diff --git a/bin/wiki/ImportarDesdeURL/node_modules/decamelize/index.js b/bin/wiki/ImportarDesdeURL/node_modules/decamelize/index.js
new file mode 100644
index 00000000..8d5bab7e
--- /dev/null
+++ b/bin/wiki/ImportarDesdeURL/node_modules/decamelize/index.js
@@ -0,0 +1,13 @@
+'use strict';
+module.exports = function (str, sep) {
+ if (typeof str !== 'string') {
+ throw new TypeError('Expected a string');
+ }
+
+ sep = typeof sep === 'undefined' ? '_' : sep;
+
+ return str
+ .replace(/([a-z\d])([A-Z])/g, '$1' + sep + '$2')
+ .replace(/([A-Z]+)([A-Z][a-z\d]+)/g, '$1' + sep + '$2')
+ .toLowerCase();
+};