Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/mock/time_deps.ts>RBTree.from

Utilities to help mock behavior, spy on function calls, stub methods, and fake time for tests.
Very Popular
Latest
method RBTree.from
import { RBTree } from "https://deno.land/x/mock@0.15.2/time_deps.ts";

Creates a new red-black tree from an array like or iterable object.

Parameters

collection: ArrayLike<T> | Iterable<T> | RBTree<T>

Parameters

collection: ArrayLike<T> | Iterable<T> | RBTree<T>
options: { Node?: RBNode; compare?: (a: T, b: T) => number; }

Parameters

collection: ArrayLike<T> | Iterable<T> | RBTree<T>
options: { compare?: (a: U, b: U) => number; map: (value: T, index: number) => U; thisArg?: V; }