Comparing version 1.0.3 to 1.0.4
@@ -85,2 +85,3 @@ 'use strict'; | ||
opts = opts || {}; | ||
if (!shouldProcessValue(obj)) return obj; | ||
if (opts.inPlace) return processKeysInPlace(obj, algorithms.camelize, opts); | ||
@@ -91,2 +92,3 @@ return processKeys(obj, algorithms.camelize, opts); | ||
opts = opts || {}; | ||
if (!shouldProcessValue(obj)) return obj; | ||
if (opts.inPlace) return processKeysInPlace(obj, decamelize, opts); | ||
@@ -97,2 +99,3 @@ return processKeys(obj, decamelize, opts); | ||
opts = opts || {}; | ||
if (!shouldProcessValue(obj)) return obj; | ||
if (opts.inPlace) return processKeysInPlace(obj, algorithms.pascalize, opts); | ||
@@ -103,2 +106,3 @@ return processKeys(obj, algorithms.pascalize, opts); | ||
opts = opts || {}; | ||
if (!shouldProcessValue(obj)) return obj; | ||
if (opts.inPlace) return processKeysInPlace(obj, depascalize, opts); | ||
@@ -105,0 +109,0 @@ return processKeys(obj, depascalize, opts); |
@@ -62,2 +62,3 @@ 'use strict'; | ||
opts = opts || {}; | ||
if(!shouldProcessValue(obj)) return obj; | ||
if(opts.inPlace) return processKeysInPlace(obj, algorithms.camelize, opts); | ||
@@ -68,2 +69,3 @@ return processKeys(obj, algorithms.camelize, opts); | ||
opts = opts || {}; | ||
if(!shouldProcessValue(obj)) return obj; | ||
if(opts.inPlace) return processKeysInPlace(obj, decamelize, opts); | ||
@@ -74,2 +76,3 @@ return processKeys(obj, decamelize, opts); | ||
opts = opts || {}; | ||
if(!shouldProcessValue(obj)) return obj; | ||
if(opts.inPlace) return processKeysInPlace(obj, algorithms.pascalize, opts); | ||
@@ -80,2 +83,3 @@ return processKeys(obj, algorithms.pascalize, opts); | ||
opts = opts || {}; | ||
if(!shouldProcessValue(obj)) return obj; | ||
if(opts.inPlace) return processKeysInPlace(obj, depascalize, opts); | ||
@@ -82,0 +86,0 @@ return processKeys(obj, depascalize, opts); |
{ | ||
"name": "xcase", | ||
"version": "1.0.3", | ||
"version": "1.0.4", | ||
"description": "Blazingly fast recursive convertion to and from camelCase or PascalCase for Objects and Arrays", | ||
@@ -5,0 +5,0 @@ "main": "indexNative", |
# xcase | ||
Blazingly fast recursive conversion to and from camelCase or PascalCase for Objects and Arrays. | ||
It supports both Node.js and Browser. Node.js has a slightly more performant native implementation. | ||
xcase passes most of https://github.com/domchristie/humps tests, excluding only those with custom regexps and handler functions. So if you use `humps` in Node and need something 4x faster then this is the right place. | ||
@@ -14,4 +16,6 @@ | ||
## Installation | ||
`npm install --save xcase` | ||
Node: `npm install --save xcase` | ||
Browser: `jspm install npm:xcase` | ||
## Usage: | ||
@@ -18,0 +22,0 @@ |
@@ -290,4 +290,11 @@ 'use strict'; | ||
}) | ||
it('keys methods should pass through strings', function() { | ||
assert.equal(humps.decamelizeKeys('AaaaBbbb'), 'AaaaBbbb'); | ||
assert.equal(humps.camelizeKeys('AaaaBbbb'), 'AaaaBbbb'); | ||
assert.equal(humps.pascalizeKeys('AaaaBbbb'), 'AaaaBbbb'); | ||
assert.equal(humps.depascalizeKeys('AaaaBbbb'), 'AaaaBbbb'); | ||
}); | ||
}); | ||
}); | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
48939
783
74
15