Skip to content

hasNone

ts
function String.hasNone(
    target: string,
    source: Iterable<string>,
): boolean

Checks if target string contains none of the strings from the source iterable.

Example

ts
import { String } from "@monstermann/string";

String.hasNone("hello world", ["foo", "bar"]); // true
ts
import { String } from "@monstermann/string";

pipe("hello world", String.hasNone(["foo", "bar"])); // true