Skip to main content

Variable: none

const none: Predicate

Defined in: predicates.d.ts:284

Returns true if fn returns a falsy value for all values of iterable. Otherwise returns false.

Example

import { none, pipe } from 'lfi'

console.log(
pipe(
[`sloth`, `lazy`, `sleep`],
none(word => word.includes(`s`)),
),
)
//=> false

console.log(
pipe(
[`sloth`, `lazy`, `sleep`],
none(word => word.includes(`x`)),
),
)
//=> true
Playground

Since

v0.0.1