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

Documentation instances distinction #129

Merged
merged 3 commits into from
Aug 24, 2023
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
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -180,17 +180,20 @@ npm install jsondiffpatch
```

```js
var jsondiffpatch = require('jsondiffpatch').create(options);
var jsondiffpatch = require('jsondiffpatch');
var jsondiffpatchInstance = jsondiffpatch.create(options);
```

Some properties are available only from static main module (e.g. formatters, console), so we need to keep the reference to it if we want to use them.
piomar123 marked this conversation as resolved.
Show resolved Hide resolved

### browser

In a browser, you could load directly a bundle in `/dist`, eg. `/dist/jsondiffpatch.umd.js`.

## Options

```javascript
var jsondiffpatch = require('jsondiffpatch').create({
var jsondiffpatchInstance = require('jsondiffpatch').create({
// used to match objects when diffing arrays, by default only === operator is used
objectHash: function (obj) {
// this function is used only to when objects are not equal by ref
Expand Down