Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/pagic/src/utils/mod.ts>sortByInsert

A static site generator powered by Deno + React
Go to Latest
function sortByInsert
import { sortByInsert } from "https://deno.land/x/pagic@v1.6.1/src/utils/mod.ts";

input: [{name:'a'}, {name:'b'}, {name:'c',insert:'before:b'}] output: [{name:'a'}, {name:'c',insert:'before:b'}, {name:'b'}]

Type Parameters

T extends { name: string; insert?: string; index?: number; }