OpenINF/openinf-util-types

[feature request] add new `isNullish` predicate function

Open

#75 opened on Nov 5, 2022

 (4 comments) (0 reactions) (0 assignees)TypeScript (2 forks)auto 404
enhancementgood first issue

Repository metrics

Stars
 (3 stars)
PR merge metrics
 (PR metrics pending)

Description

Checks whether something is null or undefined.

Would be useful for https://github.com/openinf/util-object/pull/133. We can have it out in the next minor…

Can this be achieved solely using Nullish coalescing? Maybe in the TS, but now wondering what ES year we are searching for compatibility with since this is a relatively new language feature.

Refs: https://devblogs.microsoft.com/typescript/announcing-typescript-4-8/#improved-intersection-reduction-union-compatibility-and-narrowing

/cc @septs @ignoreintuition

Contributor guide