1.0.0 • Published 8 years ago
common-updates v1.0.0
Common Updates
A collection of types for representing updates to JavaScript objects and arrays
Installation
Install it from NPM:
npm install common-updates
Usage
Types
All update types extend the base Update
class.
UpdateAssignment(value [,valuePrevious])
UpdateArrayUpdate(index, element [, elementPrevious])
UpdateArraySplice(index, elementsAdded, elementsRemoved)
UpdateObjectUpdate(property, value [, valuePrevious)
: note that this is used to represent both the addition and overwriting of propertiesUpdateObjectDelete(property [, valuePrevious)
Other utilities
Note that update types implement the IMappable
interface from Common Collections for easy transformation. In a future release, they will also implement the ISerializable
interface.
1.0.0
8 years ago