Class: JSONPatch
Defined in: src/patch/patch.ts:330
Constructors
new JSONPatch()
new JSONPatch(
ops?):JSONPatch
Defined in: src/patch/patch.ts:337
Parameters
ops?
OpObject[]
Returns
Methods
[iterator]()
[iterator]():
Iterator<OpObject>
Defined in: src/patch/patch.ts:346
Returns
Iterator<OpObject>
an iterator over ops in this patch.
add()
add(
path,value):this
Defined in: src/patch/patch.ts:358
Parameters
path
string | JSONPointer
value
Returns
this
apply()
apply(
value):JSONValue
Defined in: src/patch/patch.ts:440
Parameters
value
Returns
build()
protectedbuild(ops):void
Defined in: src/patch/patch.ts:464
Parameters
ops
OpObject[]
Returns
void
copy()
copy(
from,path):this
Defined in: src/patch/patch.ts:413
Parameters
from
string | JSONPointer
path
string | JSONPointer
Returns
this
ensurePointer()
protectedensurePointer(p,op,index):JSONPointer
Defined in: src/patch/patch.ts:550
Parameters
p
string | JSONPointer
op
string
index
number
Returns
move()
move(
from,path):this
Defined in: src/patch/patch.ts:398
Parameters
from
string | JSONPointer
path
string | JSONPointer
Returns
this
opPointer()
protectedopPointer(opObj,key,op,index):JSONPointer
Defined in: src/patch/patch.ts:509
Parameters
opObj
key
keyof OpObject
op
string
index
number
Returns
opValue()
protectedopValue(opObj,key,op,index):JSONValue
Defined in: src/patch/patch.ts:537
Parameters
opObj
key
keyof OpObject
op
string
index
number
Returns
remove()
remove(
path):this
Defined in: src/patch/patch.ts:369
Parameters
path
string | JSONPointer
Returns
this
replace()
replace(
path,value):this
Defined in: src/patch/patch.ts:382
Parameters
path
string | JSONPointer
value
Returns
this
test()
test(
path,value):this
Defined in: src/patch/patch.ts:429
Parameters
path
string | JSONPointer
value
Returns
this
toArray()
toArray():
OpObject[]
Defined in: src/patch/patch.ts:460
Returns
OpObject[]