https://github.com/streamich/fastest-stable-stringify
Fastest stable JSON stringifier
https://github.com/streamich/fastest-stable-stringify
Last synced: 10 months ago
JSON representation
Fastest stable JSON stringifier
- Host: GitHub
- URL: https://github.com/streamich/fastest-stable-stringify
- Owner: streamich
- License: other
- Fork: true (epoberezkin/fast-json-stable-stringify)
- Created: 2018-03-09T11:56:38.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2023-04-04T00:43:42.000Z (almost 3 years ago)
- Last Synced: 2024-08-10T09:16:42.645Z (over 1 year ago)
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/fastest-stable-stringify
- Size: 43 KB
- Stars: 5
- Watchers: 2
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-list - fastest-stable-stringify
README
# fastest-stable-stringify
Deterministic `JSON.stringify()` - fastest stable JSON stringifier. This project combines [fast-json-stable-stringify](https://github.com/epoberezkin/fast-json-stable-stringify) and [fast-stable-stringify](https://github.com/nickyout/fast-stable-stringify) to create the fastest stable JSON stringifier.
## Installation
With [npm](https://npmjs.org) do:
```
npm install fastest-stable-stringify
```
## Usage
```js
var stringify = require('fastest-stable-stringify');
var str = stringify({foo: 'bar'});
```
## Benchmark
To run benchmark
```
node benchmark
```
Results
```
fastest-stable-stringify x 11,629 ops/sec ±0.67% (92 runs sampled)
fast-stable-stringify x 11,352 ops/sec ±0.63% (91 runs sampled)
fast-json-stable-stringify x 10,085 ops/sec ±0.52% (91 runs sampled)
faster-stable-stringify x 8,645 ops/sec ±0.62% (87 runs sampled)
json-stable-stringify x 7,761 ops/sec ±0.61% (86 runs sampled)
The fastest is fastest-stable-stringify
```
## License
[MIT](./LICENSE)