Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
fast-case
is a JavaScript library for camelcase and pascalcase. It is designed to be similar to humps and xcase, with algorithm optimizations for additional speed.
$ 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 are available via GitHub Actions.
xcase#camelize x 5,743,288 ops/sec ±0.84% (179 runs sampled)
fastCase#camelize x 6,830,633 ops/sec ±0.79% (182 runs sampled)
humps#camelize x 867,373 ops/sec ±1.01% (180 runs sampled)
Fastest is fastCase#camelize
xcase#decamelize x 5,223,684 ops/sec ±1.37% (181 runs sampled)
fastCase#decamelize x 5,329,052 ops/sec ±0.88% (183 runs sampled)
humps#decamelize x 1,559,349 ops/sec ±0.82% (183 runs sampled)
Fastest is fastCase#decamelize
xcase#pascalize x 5,528,203 ops/sec ±0.86% (179 runs sampled)
fastCase#pascalize x 6,206,861 ops/sec ±0.94% (181 runs sampled)
humps#pascalize x 760,483 ops/sec ±0.78% (181 runs sampled)
Fastest is fastCase#pascalize
xcase#depascalize x 5,083,156 ops/sec ±0.76% (181 runs sampled)
fastCase#depascalize x 5,002,102 ops/sec ±0.93% (182 runs sampled)
humps#depascalize x 1,435,249 ops/sec ±0.71% (184 runs sampled)
Fastest is xcase#depascalize
xcase#camelizeKeys x 553,915 ops/sec ±0.90% (183 runs sampled)
fastCase#camelizeKeys x 586,491 ops/sec ±0.81% (182 runs sampled)
humps#camelizeKeys x 174,884 ops/sec ±0.70% (183 runs sampled)
Fastest is fastCase#camelizeKeys
xcase#camelizeKeys (in place) x 649,486 ops/sec ±0.80% (172 runs sampled)
fastCase#camelizeKeysInPlace (in place) x 639,780 ops/sec ±0.87% (182 runs sampled)
Fastest is xcase#camelizeKeys (in place)
xcase#decamelizeKeys x 592,740 ops/sec ±0.94% (181 runs sampled)
fastCase#decamelizeKeys x 594,536 ops/sec ±0.97% (184 runs sampled)
humps#decamelizeKeys x 283,610 ops/sec ±0.89% (180 runs sampled)
Fastest is fastCase#decamelizeKeys,xcase#decamelizeKeys
xcase#camelizeKeys (large object) x 651 ops/sec ±0.92% (178 runs sampled)
fastCase#camelizeKeys (large object) x 765 ops/sec ±0.99% (175 runs sampled)
humps#camelizeKeys (large object) x 216 ops/sec ±0.94% (173 runs sampled)
Fastest is fastCase#camelizeKeys (large object)
xcase#camelizeKeys (in place) (large object) x 549 ops/sec ±1.44% (172 runs sampled)
fastCase#camelizeKeysInPlace (in place) (large object) x 797 ops/sec ±0.87% (178 runs sampled)
Fastest is fastCase#camelizeKeysInPlace (in place) (large object)
xcase#pascalizeKeys (large object) x 440 ops/sec ±0.77% (180 runs sampled)
fastCase#pascalizeKeys (large object) x 528 ops/sec ±0.78% (179 runs sampled)
humps#pascalizeKeys (large object) x 254 ops/sec ±0.86% (174 runs sampled)
Fastest is fastCase#pascalizeKeys (large object)
xcase#pascalizeKeys (in place) (large object) x 836 ops/sec ±0.93% (178 runs sampled)
fastCase#pascalizeKeysInPlace (in place) (large object) x 1,099 ops/sec ±1.02% (176 runs sampled)
Fastest is fastCase#pascalizeKeysInPlace (in place) (large object)
This module is based in part on an older C++ based version of xcase
.
MIT license, see LICENSE
. Copyright 2018 Jacob Gillespie. Code originally from xcase, copyright 2016 Code Charm.
v1.6.0
FAQs
A fast JS library for camelCase and PascalCase
The npm package fast-case receives a total of 5,176 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
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.