Skip to content

Conversation

@JimLynchCodes
Copy link

  • Added an es6 import example

  • moved these examples to a better location (in the install section)

var stringify = require('json-stable-stringify')
```

Es6 example:
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Es6 example:
ESM example:


CommonJS example:
``` js
var stringify = require('json-stable-stringify')
Copy link
Owner

@ljharb ljharb Dec 7, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
var stringify = require('json-stable-stringify')
const stringify = require('json-stable-stringify');


Es6 example:
``` js
import stringify from 'json-stable-stringify'
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
import stringify from 'json-stable-stringify'
import stringify from 'json-stable-stringify';

npm install json-stable-stringify
```

CommonJS example:
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
CommonJS example:
CJS example:

@ljharb ljharb added the documentation Improvements or additions to documentation label Dec 7, 2023
@ljharb ljharb marked this pull request as draft January 16, 2024 17:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants