.gitignore added
[dotfiles/.git] / .config / coc / extensions / node_modules / coc-prettier / node_modules / decamelize-keys / index.js
diff --git a/.config/coc/extensions/node_modules/coc-prettier/node_modules/decamelize-keys/index.js b/.config/coc/extensions/node_modules/coc-prettier/node_modules/decamelize-keys/index.js
new file mode 100644 (file)
index 0000000..f731ca0
--- /dev/null
@@ -0,0 +1,19 @@
+'use strict';
+var mapObj = require('map-obj');
+var decamelize = require('decamelize');
+
+module.exports = function (input, separator, options) {
+       if (typeof separator !== 'string') {
+               options = separator;
+               separator = null;
+       }
+
+       options = options || {};
+       separator = separator || options.separator;
+       var exclude = options.exclude || [];
+
+       return mapObj(input, function (key, val) {
+               key = exclude.indexOf(key) === -1 ? decamelize(key, separator) : key;
+               return [key, val];
+       });
+};