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

x/molt/lib/std/collections.ts

Update dependencies the Deno way
Latest
import * as molt from "https://deno.land/x/molt@0.17.2/lib/std/collections.ts";

Functions

Merges the two given Records, recursively merging any nested Records with the second collection overriding the first in case of conflict

Returns all distinct elements in the given array, preserving order by first occurrence.

Returns all elements in the given array that produce a distinct value using the given selector, preserving order by first occurrence.

Returns a new record with all entries of the given record except the ones that do not match the given predicate.

Returns a new record with all entries of the given record except the ones that have a key that does not match the given predicate.

Applies the given transformer to all entries in the given record and returns a new record containing the results.

Returns a new array, containing all elements in the given array transformed using the given transformer, except the ones that were transformed to null or undefined.

Applies the given transformer to all values in the given record and returns a new record containing the resulting keys associated to the last value that produced them.

Returns the first element that is the largest value of the given function or undefined if there are no elements.

Creates a new object by excluding the specified keys from the provided object.

Returns a tuple of two arrays with the first one containing all elements in the given array that match the given predicate and the second one containing all that do not.