Creates an insert operation that inserts the provided items before the provided index or reference item.
insert
The items to insert.
The index or reference item to insert before.
An insert operation before the provided index or reference item. https://www.sanity.io/docs/http-patches#0SQmPlb6
const insertFooBeforeIndex3 = insertBefore('foo', 3)const insertObjectBeforeKey = insertBefore({name: 'foo'}, {_key: 'xyz'}] Copy
const insertFooBeforeIndex3 = insertBefore('foo', 3)const insertObjectBeforeKey = insertBefore({name: 'foo'}, {_key: 'xyz'}]
Creates an
insert
operation that inserts the provided items before the provided index or reference item.