File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -180,17 +180,20 @@ npm install jsondiffpatch
180180```
181181
182182``` js
183- var jsondiffpatch = require (' jsondiffpatch' ).create (options);
183+ var jsondiffpatch = require (' jsondiffpatch' );
184+ var jsondiffpatchInstance = jsondiffpatch .create (options);
184185```
185186
187+ 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.
188+
186189### browser
187190
188191In a browser, you could load directly a bundle in ` /dist ` , eg. ` /dist/jsondiffpatch.umd.js ` .
189192
190193## Options
191194
192195``` javascript
193- var jsondiffpatch = require (' jsondiffpatch' ).create ({
196+ var jsondiffpatchInstance = require (' jsondiffpatch' ).create ({
194197 // used to match objects when diffing arrays, by default only === operator is used
195198 objectHash : function (obj ) {
196199 // this function is used only to when objects are not equal by ref
You can’t perform that action at this time.
0 commit comments