remove
function
remove()
Option name | Type | Description |
---|---|---|
objectsOrIds | Object, Function | id or object with |
[change] | Object, Function | Change properties or function that changes existing object |
return | Promise |
removes existing object
function remove (objectsOrIds, change) {
return Array.isArray(objectsOrIds)
? updateMany.call(this, objectsOrIds.map(markAsDeleted.bind(null, change)))
: updateOne.call(this, markAsDeleted(change, objectsOrIds))
}