Newer
Older
ez-indexation / app / node_modules / camelcase-keys / index.js
@kieffer kieffer on 7 Mar 2017 328 bytes v0.0.0
'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];
	});
};