
Security News
Insecure Agents Podcast: Certified Patches, Supply Chain Security, and AI Agents
Socket CEO Feross Aboukhadijeh joins Insecure Agents to discuss CVE remediation and why supply chain attacks require a different security approach.
fast-case is a C++ NodeJS library for camelcase and pascalcase. It is designed to be similar to humps and xcase, however the string manipulation is performed in native C++ for extra speed.
The module was originally based on an older version of xcase, and all credit for the C++ implementation is due there.
$ yarn add fast-case
import {
camelize,
decamelize,
pascalize,
depascalize,
camelizeKeys,
camelizeKeysInPlace,
decamelizeKeys,
decamelizeKeysInPlace,
pascalizeKeys,
pascalizeKeysInPlace,
depascalizeKeys,
depascalizeKeysInPlace,
} from 'fast-case'
// 'a_string' -> 'aString'
camelize(string)
// 'aString' -> 'a_string'
decamelize(string)
// 'a_string' -> 'AString'
pascalize(string)
// 'AString' -> 'a_string'
depascalize(string)
// Camelize all object keys (recursive),
// optionally modify the object in-place.
camelizeKeys(obj)
camelizeKeysInPlace(obj)
// De-camelize all object keys (recursive),
// optionally modify the object in-place.
decamelizeKeys(obj)
decamelizeKeysInPlace(obj)
// Pascalize all object keys (recursive),
// optionally modify the object in-place.
pascalizeKeys(obj)
pascalizeKeysInPlace(obj)
// De-pascalize all object keys (recursive),
// optionally modify the object in-place.
depascalizeKeys(obj)
depascalizeKeysInPlace(obj)
Run yarn benchmark to benchmark locally. Informal benchmark results, from my MacBook:
xcase#camelize x 5,908,275 ops/sec ±1.87% (87 runs sampled)
fastCase#camelize x 6,840,838 ops/sec ±1.05% (86 runs sampled)
humps#camelize x 1,069,485 ops/sec ±2.27% (85 runs sampled)
Fastest is fastCase#camelize
xcase#decamelize x 5,752,196 ops/sec ±1.53% (87 runs sampled)
fastCase#decamelize x 6,855,233 ops/sec ±1.20% (89 runs sampled)
humps#decamelize x 1,478,651 ops/sec ±1.06% (92 runs sampled)
Fastest is fastCase#decamelize
xcase#camelizeKeys x 467,379 ops/sec ±1.18% (87 runs sampled)
xcase#camelizeKeys (in place) x 892,510 ops/sec ±1.49% (87 runs sampled)
fastCase#camelizeKeys x 797,915 ops/sec ±1.26% (85 runs sampled)
fastCase#camelizeKeysInPlace (in place) x 930,655 ops/sec ±1.67% (85 runs sampled)
humps#camelizeKeys x 223,023 ops/sec ±1.12% (86 runs sampled)
Fastest is fastCase#camelizeKeysInPlace (in place)
xcase#decamelizeKeys x 466,267 ops/sec ±1.63% (88 runs sampled)
fastCase#decamelizeKeys x 273,557 ops/sec ±2.24% (86 runs sampled)
humps#decamelizeKeys x 223,139 ops/sec ±2.71% (83 runs sampled)
Fastest is xcase#decamelizeKeys
xcase#camelizeKeys (large object) x 537 ops/sec ±2.52% (82 runs sampled)
xcase#camelizeKeys (in place) (large object) x 481 ops/sec ±2.16% (81 runs sampled)
fastCase#camelizeKeys (large object) x 501 ops/sec ±2.11% (81 runs sampled)
fastCase#camelizeKeysInPlace (in place) (large object) x 996 ops/sec ±1.35% (82 runs sampled)
humps#camelizeKeys (large object) x 218 ops/sec ±1.48% (78 runs sampled)
Fastest is fastCase#camelizeKeysInPlace (in place) (large object)
xcase#pascalizeKeys (large object) x 316 ops/sec ±1.11% (84 runs sampled)
xcase#pascalizeKeys (in place) (large object) x 923 ops/sec ±2.66% (85 runs sampled)
fastCase#pascalizeKeys (large object) x 858 ops/sec ±1.92% (87 runs sampled)
fastCase#pascalizeKeysInPlace (in place) (large object) x 915 ops/sec ±1.42% (83 runs sampled)
humps#pascalizeKeys (large object) x 208 ops/sec ±1.00% (81 runs sampled)
Fastest is fastCase#pascalizeKeysInPlace (in place) (large object)
MIT license, see LICENSE. Copyright 2018 Jacob Gillespie. Code originally from xcase, copyright 2016 Code Charm.
FAQs
A fast JS library for camelCase and PascalCase
The npm package fast-case receives a total of 2,819 weekly downloads. As such, fast-case popularity was classified as popular.
We found that fast-case demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Socket CEO Feross Aboukhadijeh joins Insecure Agents to discuss CVE remediation and why supply chain attacks require a different security approach.

Security News
Tailwind Labs laid off 75% of its engineering team after revenue dropped 80%, as LLMs redirect traffic away from documentation where developers discover paid products.

Security News
The planned feature introduces a review step before releases go live, following the Shai-Hulud attacks and a rocky migration off classic tokens that disrupted maintainer workflows.