upsert
description
Inserts or updates (upserts) an item in an input array. The predicate function checks for the item's existence in the input array. If it does not exist, a new array is returned with the values from the input array and the item appended to them.
Like all functions in conductor, upsert
is a pure function and will not modify the input array.
example
inserting a new value
updating a value
Last updated