Hi there! Are you looking for the official Deno documentation? Try docs.deno.com for all your Deno learning needs.

getSortableDatum

import { getSortableDatum } from "https://github.gh-proxy.cn/raw.githubusercontent.com/baetheus/fun/main/datum.ts";

Create a Sortable instance for Datum given a Sortable for the inner type.

@example
import { getSortableDatum, replete, initial } from "./datum.ts";
import * as N from "./number.ts";
import * as A from "./array.ts";
import { pipe } from "./fn.ts";

const sortable = getSortableDatum(N.SortableNumber);
const data = [replete(3), initial, replete(1)];
const sorted = pipe(
  data,
  A.sort(sortable)
);
// [initial, replete(1), replete(3)]
function getSortableDatum<A>(O: Sortable<A>): Sortable<Datum<A>>;
§
getSortableDatum<A>(O: Sortable<A>): Sortable<Datum<A>>
[src]

§Type Parameters

§Parameters

§Return Type