Skip to content

Commit daed177

Browse files
authored
Merge pull request #2 from sxwei123/develop
Improve document
2 parents bb3be27 + bc83882 commit daed177

File tree

9 files changed

+13
-37
lines changed

9 files changed

+13
-37
lines changed

.eslintignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
node_modules
2-
dist
2+
dist
3+
benchmark

.github/FUNDING.yml

Lines changed: 0 additions & 2 deletions
This file was deleted.

.travis.yml

Lines changed: 0 additions & 8 deletions
This file was deleted.

README.md

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,16 +18,21 @@ yarn add quick-stable-stringify
1818

1919
## Examples
2020

21+
Node.JS with CommonJS:
22+
2123
```js
22-
var stringify = require("quick-stable-stringify");
23-
var obj = { c: 8, b: [{ z: 6, y: 5, x: 4 }, 7], a: 3 };
24+
const stringify = require("quick-stable-stringify");
25+
const obj = { c: 8, b: [{ z: 6, y: 5, x: 4 }, 7], a: 3 };
2426
console.log(stringify(obj));
2527
```
2628

27-
output:
29+
Typescript or modern Javascript environment:
2830

29-
```
30-
{"a":3,"b":[{"x":4,"y":5,"z":6},7],"c":8}
31+
```ts
32+
import stringify from "quick-stable-stringify";
33+
34+
const obj = { c: 8, b: [{ z: 6, y: 5, x: 4 }, 7], a: 3 };
35+
console.log(stringify(obj));
3136
```
3237

3338
## Options

example/key_cmp.js

Lines changed: 0 additions & 7 deletions
This file was deleted.

example/nested.js

Lines changed: 0 additions & 3 deletions
This file was deleted.

example/str.js

Lines changed: 0 additions & 3 deletions
This file was deleted.

example/value_cmp.js

Lines changed: 0 additions & 7 deletions
This file was deleted.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "quick-stable-stringify",
3-
"version": "0.0.1",
3+
"version": "0.0.2",
44
"description": "Deterministic `JSON.stringify()` - a faster version of Evgeny's fast-json-stable-strigify. Built with Typescript and modern Javascript.",
55
"main": "./dist/index.js",
66
"exports": "./dist/index.js",

0 commit comments

Comments
 (0)