Comparing version 1.2.1 to 1.3.0
# Changelog | ||
### Unreleased | ||
### v1.3.0 | ||
- Rewrite module in JavaScript for faster performance | ||
### v1.2.2 | ||
- Include src directory in npm bundle | ||
### v1.2.1 | ||
@@ -6,0 +12,0 @@ |
{ | ||
"name": "fast-case", | ||
"version": "1.2.1", | ||
"description": "A fast C++ library for camelcase and pascalcase", | ||
"version": "1.3.0", | ||
"description": "A fast JS library for camelCase and PascalCase", | ||
"author": "Jacob Gillespie <jacobwgillespie@gmail.com>", | ||
@@ -9,24 +9,13 @@ "homepage": "https://github.com/jacobwgillespie/fast-case", | ||
"license": "MIT", | ||
"main": "dist/fastCase.js", | ||
"module": "dist/fastCase.mjs", | ||
"source": "src/index.mjs", | ||
"main": "dist/fast-case.js", | ||
"module": "dist/fast-case.mjs", | ||
"source": "fast-case.js", | ||
"typings": "./fast-case.d.ts", | ||
"files": [ | ||
"dist", | ||
"binding.gyp", | ||
"package.json", | ||
"fast-case.d.ts", | ||
"LICENSE", | ||
"README.md" | ||
"fast-case.d.ts" | ||
], | ||
"scripts": { | ||
"benchmark": "node support/benchmark.js", | ||
"build": "microbundle", | ||
"clean": "rm -rf dist", | ||
"dev": "microbundle watch", | ||
"format": "prettier --write './src/**/*.{js,mjs}' && clang-format -i src/fast-case.cc src/algorithms.hpp", | ||
"install": "prebuild-install || node-gyp rebuild", | ||
"prebuild:build": "prebuild --all --strip --verbose", | ||
"prebuild:rebuild": "prebuild --compile", | ||
"prepare": "npm run clean && npm run build", | ||
"benchmark": "node benchmark.js", | ||
"build": "microbundle -f es,cjs --no-compress --no-sourcemap", | ||
"test": "ava" | ||
@@ -40,18 +29,11 @@ }, | ||
}, | ||
"dependencies": { | ||
"bindings": "^1.3.0", | ||
"nan": "^2.11.0", | ||
"prebuild-install": "^5.1.0" | ||
}, | ||
"dependencies": {}, | ||
"devDependencies": { | ||
"ava": "^0.25.0", | ||
"ava": "^1.0.1", | ||
"benchmark": "^2.1.4", | ||
"clang-format": "^1.2.4", | ||
"humps": "^2.0.1", | ||
"microbundle": "^0.6.0", | ||
"prebuild": "^8.0.1", | ||
"prebuild-ci": "^2.2.3", | ||
"prettier": "^1.14.2", | ||
"microbundle": "^0.9.0", | ||
"prettier": "^1.15.3", | ||
"xcase": "^2.0.1" | ||
} | ||
} |
@@ -7,8 +7,4 @@ # ⚡ fast-case | ||
`fast-case` is a C++ NodeJS library for camelcase and pascalcase. It is designed to be similar to [humps][0] and [xcase][1], however the string manipulation is performed in native C++ for extra speed. | ||
`fast-case` is a JavaScript library for camelcase and pascalcase. It is designed to be similar to [humps][0] and [xcase][1], with algorithm optimizations for additional speed. | ||
--- | ||
The module was originally based on an older version of `xcase`, and all credit for the C++ implementation is due there. | ||
## Installation | ||
@@ -76,39 +72,53 @@ | ||
``` | ||
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) | ||
xcase#camelize x 5,911,187 ops/sec ±5.42% (76 runs sampled) | ||
fastCase#camelize x 7,555,230 ops/sec ±2.79% (79 runs sampled) | ||
humps#camelize x 903,206 ops/sec ±2.09% (82 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) | ||
xcase#decamelize x 6,522,038 ops/sec ±2.99% (79 runs sampled) | ||
fastCase#decamelize x 7,020,373 ops/sec ±1.69% (78 runs sampled) | ||
humps#decamelize x 1,647,107 ops/sec ±2.75% (77 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#pascalize x 6,715,499 ops/sec ±1.78% (82 runs sampled) | ||
fastCase#pascalize x 8,204,444 ops/sec ±1.98% (82 runs sampled) | ||
humps#pascalize x 793,728 ops/sec ±2.06% (79 runs sampled) | ||
Fastest is fastCase#pascalize | ||
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) | ||
xcase#depascalize x 6,989,851 ops/sec ±1.85% (79 runs sampled) | ||
fastCase#depascalize x 7,138,850 ops/sec ±1.47% (77 runs sampled) | ||
humps#depascalize x 1,502,335 ops/sec ±2.46% (81 runs sampled) | ||
Fastest is fastCase#depascalize | ||
xcase#camelizeKeys x 608,665 ops/sec ±1.51% (76 runs sampled) | ||
xcase#camelizeKeys (in place) x 658,691 ops/sec ±2.33% (76 runs sampled) | ||
fastCase#camelizeKeys x 618,604 ops/sec ±1.72% (78 runs sampled) | ||
fastCase#camelizeKeysInPlace (in place) x 639,410 ops/sec ±2.45% (74 runs sampled) | ||
humps#camelizeKeys x 237,910 ops/sec ±2.28% (77 runs sampled) | ||
Fastest is xcase#camelizeKeys (in place) | ||
xcase#decamelizeKeys x 614,568 ops/sec ±3.27% (79 runs sampled) | ||
fastCase#decamelizeKeys x 554,890 ops/sec ±2.23% (80 runs sampled) | ||
humps#decamelizeKeys x 220,343 ops/sec ±2.01% (76 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) | ||
xcase#camelizeKeys (large object) x 633 ops/sec ±1.90% (77 runs sampled) | ||
xcase#camelizeKeys (in place) (large object) x 520 ops/sec ±4.37% (74 runs sampled) | ||
fastCase#camelizeKeys (large object) x 654 ops/sec ±1.64% (77 runs sampled) | ||
fastCase#camelizeKeysInPlace (in place) (large object) x 781 ops/sec ±1.40% (76 runs sampled) | ||
humps#camelizeKeys (large object) x 256 ops/sec ±1.98% (74 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) | ||
xcase#pascalizeKeys (large object) x 403 ops/sec ±3.47% (76 runs sampled) | ||
xcase#pascalizeKeys (in place) (large object) x 815 ops/sec ±1.95% (83 runs sampled) | ||
fastCase#pascalizeKeys (large object) x 1,002 ops/sec ±2.58% (81 runs sampled) | ||
fastCase#pascalizeKeysInPlace (in place) (large object) x 1,105 ops/sec ±1.64% (82 runs sampled) | ||
humps#pascalizeKeys (large object) x 234 ops/sec ±1.53% (77 runs sampled) | ||
Fastest is fastCase#pascalizeKeysInPlace (in place) (large object) | ||
``` | ||
## Credits | ||
This module is based in part on an older C++ based version of `xcase`. | ||
## License | ||
@@ -115,0 +125,0 @@ |
Sorry, the diff of this file is not supported yet
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
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
Native code
Supply chain riskContains native code (e.g., compiled binaries or shared libraries). Including native code can obscure malicious behavior.
Found 1 instance in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
0
6
441
0
128
18568
7
- Removedbindings@^1.3.0
- Removednan@^2.11.0
- Removedprebuild-install@^5.1.0
- Removedansi-regex@2.1.1(transitive)
- Removedaproba@1.2.0(transitive)
- Removedare-we-there-yet@1.1.7(transitive)
- Removedbase64-js@1.5.1(transitive)
- Removedbindings@1.5.0(transitive)
- Removedbl@4.1.0(transitive)
- Removedbuffer@5.7.1(transitive)
- Removedchownr@1.1.4(transitive)
- Removedcode-point-at@1.1.0(transitive)
- Removedconsole-control-strings@1.1.0(transitive)
- Removedcore-util-is@1.0.3(transitive)
- Removeddecompress-response@4.2.1(transitive)
- Removeddeep-extend@0.6.0(transitive)
- Removeddelegates@1.0.0(transitive)
- Removeddetect-libc@1.0.3(transitive)
- Removedend-of-stream@1.4.4(transitive)
- Removedexpand-template@2.0.3(transitive)
- Removedfile-uri-to-path@1.0.0(transitive)
- Removedfs-constants@1.0.0(transitive)
- Removedgauge@2.7.4(transitive)
- Removedgithub-from-package@0.0.0(transitive)
- Removedhas-unicode@2.0.1(transitive)
- Removedieee754@1.2.1(transitive)
- Removedinherits@2.0.4(transitive)
- Removedini@1.3.8(transitive)
- Removedis-fullwidth-code-point@1.0.0(transitive)
- Removedisarray@1.0.0(transitive)
- Removedmimic-response@2.1.0(transitive)
- Removedminimist@1.2.8(transitive)
- Removedmkdirp-classic@0.5.3(transitive)
- Removednan@2.22.0(transitive)
- Removednapi-build-utils@1.0.2(transitive)
- Removednode-abi@2.30.1(transitive)
- Removednoop-logger@0.1.1(transitive)
- Removednpmlog@4.1.2(transitive)
- Removednumber-is-nan@1.0.1(transitive)
- Removedobject-assign@4.1.1(transitive)
- Removedonce@1.4.0(transitive)
- Removedprebuild-install@5.3.6(transitive)
- Removedprocess-nextick-args@2.0.1(transitive)
- Removedpump@3.0.2(transitive)
- Removedrc@1.2.8(transitive)
- Removedreadable-stream@2.3.83.6.2(transitive)
- Removedsafe-buffer@5.1.2(transitive)
- Removedsemver@5.7.2(transitive)
- Removedset-blocking@2.0.0(transitive)
- Removedsignal-exit@3.0.7(transitive)
- Removedsimple-concat@1.0.1(transitive)
- Removedsimple-get@3.1.1(transitive)
- Removedstring-width@1.0.2(transitive)
- Removedstring_decoder@1.1.1(transitive)
- Removedstrip-ansi@3.0.1(transitive)
- Removedstrip-json-comments@2.0.1(transitive)
- Removedtar-fs@2.1.1(transitive)
- Removedtar-stream@2.2.0(transitive)
- Removedtunnel-agent@0.6.0(transitive)
- Removedutil-deprecate@1.0.2(transitive)
- Removedwhich-pm-runs@1.1.0(transitive)
- Removedwide-align@1.1.5(transitive)
- Removedwrappy@1.0.2(transitive)