null
Null all of the things! This package was originally created as a joke, but hey now it actually does something non-trivial.
If you ever use null
for logic tests, you can try using a Symbol
instead via the NullRef library provided by this package.
This package provides for a NULL
constant that is a Symbol from the Global Symbol Registry, as well as convenience methods for testing, casting, and comparing values.
Usage
Require and reference what you need:
const nullref = require('null');
const nulltest = nullref.lib;
const isNull = nullref.isNull
const isNullRef = nullref.isNullRef
const NULL = nullref();
Consume and use as needed.
let x = null;
if( nulltest.is(x) )
if( isNull(x) )
if( NULL === nulltest.to(x) )