Mixin: Updating

Updating

Provides methods to handle object update operations.
Source:

Methods

(private, static) _updateClear(doc, prop)

Removes all properties from an object without destroying the object instance, thereby maintaining data-bound linking.
Parameters:
Name Type Description
doc Object The parent object to modify.
prop String The name of the child object to clear.
Source:

(private, static) _updateIncrement(doc, prop, val)

Increments a value for a property on a document by the passed number.
Parameters:
Name Type Description
doc Object The document to modify.
prop String The property to modify.
val Number The amount to increment by.
Source:

(private, static) _updateMultiply(doc, prop, val)

Multiplies a value for a property on a document by the passed number.
Parameters:
Name Type Description
doc Object The document to modify.
prop String The property to modify.
val Number The amount to multiply by.
Source:

(private, static) _updateOverwrite(doc, prop, val)

Sets a property on a document to the passed value.
Parameters:
Name Type Description
doc Object The document to modify.
prop String The property to delete.
val * The new property value.
Source:

(private, static) _updatePop(doc, val) → {Boolean}

Pops an item or items from the array stack.
Parameters:
Name Type Description
doc Object The document to modify.
val Number If set to a positive integer, will pop the number specified from the stack, if set to a negative integer will shift the number specified from the stack.
Source:
Returns:
Type
Boolean

(private, static) _updateProperty(doc, prop, val)

Updates a property on an object.
Parameters:
Name Type Description
doc Object The object whose property is to be updated.
prop String The property to update.
val * The new value of the property.
Source:

(private, static) _updatePull(arr, index)

Removes an item from the passed array.
Parameters:
Name Type Description
arr Array The array to modify.
index Number The index of the item in the array to remove.
Source:

(private, static) _updatePush(arr, doc)

Inserts an item at the end of an array.
Parameters:
Name Type Description
arr Array The array to insert the item into.
doc Object The document to insert.
Source:

(private, static) _updateRename(doc, prop, val)

Renames a property on a document to the passed property.
Parameters:
Name Type Description
doc Object The document to modify.
prop String The property to rename.
val Number The new property name.
Source:

(private, static) _updateSpliceMove(arr, indexFrom, indexTo)

Changes the index of an item in the passed array.
Parameters:
Name Type Description
arr Array The array to modify.
indexFrom Number The index to move the item from.
indexTo Number The index to move the item to.
Source:

(private, static) _updateSplicePush(arr, index, doc)

Inserts an item into the passed array at the specified index.
Parameters:
Name Type Description
arr Array The array to insert into.
index Number The index to insert at.
doc Object The document to insert.
Source:

(private, static) _updateUnset(doc, prop)

Deletes a property on a document.
Parameters:
Name Type Description
doc Object The document to modify.
prop String The property to delete.
Source: