Skip to main content

Function: neq()

neq<T>(expected): Predicate<T>

Defined in: predicate/comparison/index.ts:150

Creates a predicate that tests if a value does not equal another value.

Uses strict inequality (!==).

Type Parameters

T

T

Parameters

expected

T

The value to compare against

Returns

Predicate<T>

A predicate that returns true if value !== expected

Example

import * as R from 'remeda'

const numbers = [1, 2, 3, 2, 1]
R.filter(numbers, neq(2)) // => [1, 3, 1]

See

eq - for equality comparison