Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

fast-case

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fast-case - npm Package Compare versions

Comparing version 1.2.1 to 1.3.0

dist/fast-case.js

8

CHANGELOG.md
# 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 @@

42

package.json
{
"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

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