Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Format README of @solana/fast-stable-stringify #2503

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 8 additions & 9 deletions packages/fast-stable-stringify/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,25 +7,24 @@ The most popular repository providing this feature is [substack's json-stable-st
Usage:

```javascript
var stringify = require('fast-stable-stringify');
import stringify from '@solana/fast-stable-stringify';
stringify({ d: 0, c: 1, a: 2, b: 3, e: 4 }); // '{"a":2,"b":3,"c":1,"d":0,"e":4}'
```

Just like substack's, it does:

* handle all variations of all basic javascript values (number, string, boolean, array, object, null, Date, BigInt)
* handle undefined _and_ function in the same way as `JSON.stringify`
* **not support ie8 (and below) with complete certainty**.
- handle all variations of all basic javascript values (number, string, boolean, array, object, null, Date, BigInt)
- handle undefined _and_ function in the same way as `JSON.stringify`
- **not support ie8 (and below) with complete certainty**.

Unlike substack's, it does:

* not implement the 'replacer' or 'space' arguments of the JSON.stringify method
* not check for circular references

- not implement the 'replacer' or 'space' arguments of the JSON.stringify method
- not check for circular references

## Running tests

```
npm run test:unit:browser
npm run test:unit:node
```
npm run test:unit:node
```
Loading