1
0
mirror of https://github.com/thangisme/notes.git synced 2024-11-09 07:37:34 -05:00
notes/node_modules/camelcase-keys/index.js
Patrick Marsceill b7b0d0d7bf
Initial commit
2017-03-09 13:16:08 -05:00

13 lines
328 B
JavaScript

'use strict';
var mapObj = require('map-obj');
var camelCase = require('camelcase');
module.exports = function (input, options) {
options = options || {};
var exclude = options.exclude || [];
return mapObj(input, function (key, val) {
key = exclude.indexOf(key) === -1 ? camelCase(key) : key;
return [key, val];
});
};