Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/complaindate/support/isTruthy.ts>isTruthy

JavaScript date-time utilities that keep timezones on the surface
Latest
function isTruthy
import { isTruthy } from "https://deno.land/x/complaindate@v1.0.1/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>