limepot-xyz/BETA/mybulma/node_modules/decamelize-keys/index.js
LimePot 76722fec47 Beta Site
Going to slowly work on a Bulma site, which will end up being the main site.

Currently under the /BETA/ folder so Alpha site will still be main site.
2022-12-20 16:23:37 -07:00

19 lines
484 B
JavaScript

'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];
});
};