is-null-like

A simple javascript function that will return true if the value is null like (aka undefined or null)

MIT 4 个版本
安装
npm install is-null-like
yarn add is-null-like
pnpm add is-null-like
bun add is-null-like
README

NPM Version Build Status

is-null-like

A simple javascript function that will return true if the value is null like (aka undefined or null)

Installation

npm i --save is-null-like

Overview

describe( 'is-null-like', function () {
  it( 'should return true in case of null', function () {
    var isNullLike = require( '../' );

    expect( isNullLike( null ) ).to.be.true;
  } );
  it( 'should return true in case of undefined', function () {
    var isNullLike = require( '../' );
    var nodef;

    expect( isNullLike( nodef ) ).to.be.true;
  } );

  it( 'should return false if the value passed is an object or primitive', function () {
    var isNullLike = require( '../' );

    expect( isNullLike( 3 ) ).to.be.false;
    expect( isNullLike( {} ) ).to.be.false;
  } );
} );

License

MIT

Changelog

changelog

版本列表
1.0.3 2015-07-25
1.0.2 2015-07-07
1.0.1 2015-07-07
1.0.0 2015-06-12