Module: x2node-patches

JSON Patch imlpementation module.

Requires

Classes

RecordPatch

Methods


<static> build(recordTypes, recordTypeName, patch)

Build record patch object from JSON Patch specification.
Parameters:
Name Type Description
recordTypes module:x2node-records~RecordTypesLibrary Record types library.
recordTypeName string Name of the record type, against records of which the patch will be applied.
patch Array.<Object> RFC 6902 JSON patch specification.
Throws:
Returns:
The patch object that can be used to apply the patch to records.
Type
module:x2node-patches~RecordPatch

<static> buildMerge(recordTypes, recordTypeName, mergePatch)

Build record patch object from Merge Patch specification.
Parameters:
Name Type Description
recordTypes module:x2node-records~RecordTypesLibrary Record types library.
recordTypeName string Name of the record type, against records of which the patch will be applied.
mergePatch Object RFC 7396 merge patch specification.
Throws:
Returns:
The patch object that can be used to apply the patch to records.
Type
module:x2node-patches~RecordPatch