Socket
Socket
Sign inDemoInstall

camelcase-keys

Package Overview
Dependencies
Maintainers
1
Versions
29
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

camelcase-keys - npm Package Compare versions

Comparing version 2.0.0 to 2.1.0

9

index.js

@@ -5,6 +5,9 @@ 'use strict';

module.exports = function (obj) {
return mapObj(obj, function (key, val) {
return [camelCase(key), val];
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];
});
};
{
"name": "camelcase-keys",
"version": "2.0.0",
"version": "2.1.0",
"description": "Convert object keys to camelCase",

@@ -5,0 +5,0 @@ "license": "MIT",

@@ -30,4 +30,26 @@ # camelcase-keys [![Build Status](https://travis-ci.org/sindresorhus/camelcase-keys.svg?branch=master)](https://travis-ci.org/sindresorhus/camelcase-keys)

## API
### camelcaseKeys(input, [options])
#### input
Type: `object`
Object to camelCase.
#### options
Type: `object`
##### exclude
Type: `array`
Default: `[]`
Exclude keys from being camelCased.
## License
MIT © [Sindre Sorhus](http://sindresorhus.com)
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc