import { isPresent } from "https://dotland.deno.dev/x/scaffold@0.3.0/src/deps/npm.ts";
Check whether a value is present (non-nullable), meaning it is neither null
or undefined
.
This can be useful as a type guard, as for example, [1, null].filter(Boolean)
does not always type-guard correctly.
Parameters
value: T