function withByDate
withByDate<T extends { id: string; createdAt: Date; }>(
items: T[],
item: T
): T[]

Returns items, newest first, with item where its createdAt puts it, as withInOrder does. useDumpListSync puts a new or newly visible dump in a list with it.

Type Parameters

T extends { id: string; createdAt: Date; }

Parameters

items: T[]
item: T

Return Type

T[]

Usage

import { withByDate } from "src/utils/feed/pagedList.ts";