import { sortByInsert } from "https://deno.land/x/pagic@v1.6.1/src/utils/common.ts";
input: [{name:'a'}, {name:'b'}, {name:'c',insert:'before:b'}] output: [{name:'a'}, {name:'c',insert:'before:b'}, {name:'b'}]
Parameters
arr: T[]
import { sortByInsert } from "https://deno.land/x/pagic@v1.6.1/src/utils/common.ts";
input: [{name:'a'}, {name:'b'}, {name:'c',insert:'before:b'}] output: [{name:'a'}, {name:'c',insert:'before:b'}, {name:'b'}]