UNPKG

@monstermann/fn

Version:

A utility library for TypeScript.

25 lines (23 loc) 476 B
import { is } from "./is.js"; import { dfdlT } from "@monstermann/dfdl"; //#region src/function/isNot.ts /** * `isNot(source)` * * Checks if two values are strictly unequal using `===` or `Object.is`. * * ```ts * isNot(5, 5); // false * isNot("hello", "world"); // true * ``` * * ```ts * pipe(5, isNot(5)); // false * pipe("hello", isNot("world")); // true * ``` */ const isNot = dfdlT((target, source) => { return !is(target, source); }, 2); //#endregion export { isNot };