@@ -27,7 +27,7 @@ npm install --save rfc6902
27
27
### Import in your script
28
28
29
29
``` js
30
- var rfc6902 = require (' rfc6902' )
30
+ const rfc6902 = require (' rfc6902' )
31
31
```
32
32
33
33
### Calculate diff between two objects
@@ -40,7 +40,7 @@ rfc6902.createPatch({first: 'Chris'}, {first: 'Chris', last: 'Brown'})
40
40
### Apply a patch to some object
41
41
42
42
``` js
43
- var users = [{first: ' Chris' , last: ' Brown' , age: 20 }]
43
+ const users = [{first: ' Chris' , last: ' Brown' , age: 20 }]
44
44
rfc6902 .applyPatch (users, [
45
45
{op: ' replace' , path: ' /0/age' , value: 21 },
46
46
{op: ' add' , path: ' /-' , value: {first: ' Raphael' , age: 37 }},
@@ -259,10 +259,10 @@ otherwise, it is an "Invalid pointer syntax" error.
259
259
260
260
#### Example
261
261
262
- This project implements JSON Pointer functionality in ` rfc6902/pointer ` ; e.g.:
262
+ This project implements JSON Pointer functionality; e.g.:
263
263
264
264
``` js
265
- const {Pointer } = require (' rfc6902/pointer ' )
265
+ const {Pointer } = require (' rfc6902' )
266
266
const repository = {
267
267
contributors: [' chbrown' , ' diachedelic' , ' nathanrobinson' , ' kbiedrzycki' , ' stefanmaric' ]
268
268
}
0 commit comments