tx.insertsorted
Home > @blaze-cardano/tx > insertSorted
insertSorted() function
Given an array and a string, it mutates the provided array and inserts the string after the closest match. It returns the index at which the string was inserted.
Signature:
insertSorted: (arr: string[], el: string) => number
Parameters
| Parameter | Type | Description | 
|---|---|---|
| arr | string[] | An array of strings to mutate. | 
| el | string | The element to insert in provided array. | 
Returns:
number
{number} The index of the insert.