polmoneys / not

A more pleasant to read alternative to isNil

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

TLDR

A shorter to type isNil and imo more pleasant to read not(input). It should encourage to check for the not-happy path first and return early if that makes any sense.

What

Will match null or undefined It won't match false/y.

Test

Two test suites, good ol' imperative vs. property based checking with fast-check.

    
    npm run test

About

A more pleasant to read alternative to isNil


Languages

Language:TypeScript 75.1%Language:JavaScript 24.9%