Class: JSONPatch
Defined in: src/patch/patch.ts:296
Constructors
Constructor
new JSONPatch(
ops?):JSONPatch
Defined in: src/patch/patch.ts:299
Parameters
ops?
OpObject[]
Returns
JSONPatch
Methods
[iterator]()
[iterator]():
Iterator<OpObject>
Defined in: src/patch/patch.ts:308
Returns
Iterator<OpObject>
an iterator over ops in this patch.
add()
add(
path,value):this
Defined in: src/patch/patch.ts:314
Parameters
path
string | JSONPointer
value
Returns
this
apply()
apply(
value):JSONValue
Defined in: src/patch/patch.ts:354
Parameters
value
Returns
build()
protectedbuild(ops):void
Defined in: src/patch/patch.ts:375
Parameters
ops
OpObject[]
Returns
void
copy()
copy(
from,path):this
Defined in: src/patch/patch.ts:339
Parameters
from
string | JSONPointer
path
string | JSONPointer
Returns
this
ensurePointer()
protectedensurePointer(p,op,index):JSONPointer
Defined in: src/patch/patch.ts:456
Parameters
p
string | JSONPointer
op
string
index
number
Returns
move()
move(
from,path):this
Defined in: src/patch/patch.ts:329
Parameters
from
string | JSONPointer
path
string | JSONPointer
Returns
this
opPointer()
protectedopPointer(opObj,key,op,index):JSONPointer
Defined in: src/patch/patch.ts:420
Parameters
opObj
key
keyof OpObject
op
string
index
number
Returns
opValue()
protectedopValue(opObj,key,op,index):JSONValue
Defined in: src/patch/patch.ts:448
Parameters
opObj
key
keyof OpObject
op
string
index
number
Returns
remove()
remove(
path):this
Defined in: src/patch/patch.ts:319
Parameters
path
string | JSONPointer
Returns
this
replace()
replace(
path,value):this
Defined in: src/patch/patch.ts:324
Parameters
path
string | JSONPointer
value
Returns
this
test()
test(
path,value):this
Defined in: src/patch/patch.ts:349
Parameters
path
string | JSONPointer
value
Returns
this
toArray()
toArray():
OpObject[]
Defined in: src/patch/patch.ts:371
Returns
OpObject[]