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

std/collections/mod.ts>withoutAll

Deno standard library
Go to Latest
The Standard Library has been moved to JSR. See the blog post for details.
function withoutAll
import { withoutAll } from "https://deno.land/std@0.159.0/collections/mod.ts";

Returns an array excluding all given values.

Example:

import { withoutAll } from "https://deno.land/std@0.159.0/collections/without_all.ts";
import { assertEquals } from "https://deno.land/std@0.159.0/testing/asserts.ts";

const withoutList = withoutAll([2, 1, 2, 3], [1, 2]);

assertEquals(withoutList, [3]);

Parameters

array: readonly T[]
values: readonly T[]