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

sort

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

Compare two numbers and return their Ordering. 0 denotes equality, -1 denotes that first is less than second, and 1 denotes that first is greater than second.

@example
import * as N from "./number.ts";
import { pipe } from "./fn.ts";

const result1 = N.compare(1)(1); // 0
const result2 = N.compare(2)(1); // 1
const result3 = N.compare(1)(2); // -1
function sort(first: number, second: number): Ordering;
§
sort(first: number, second: number): Ordering
[src]

§Parameters

§
first: number
[src]
§
second: number
[src]