Skip to main content
The Deno 2 Release Candidate is here
Learn more
Module

x/complaindate/support/isTruthy.ts>isTruthy

JavaScript date-time utilities that keeps timezones on the surface
Go to Latest
function isTruthy
import { isTruthy } from "https://deno.land/x/complaindate@v0.7.2/support/isTruthy.ts";

Type predicate for use with Array.filter.

Examples

Example 1

[0, 1, {}, true, false, null, undefined].filter(isTruthy) // [1, {}, true]

Returns

x is NonNullable<T>