JSPM

@silen/is-null

1.0.3
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • 0
  • Score
    100M100P100Q6743F
  • License MIT

Check if the parameter is null

Package Exports

  • @silen/is-null

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@silen/is-null) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

is-null

Determine if a value is Null

install

npm i @silen/is-null

api

  • declare function isNull(val: any): boolean;

usage

const { isNull } = require('@silen/is-null');
// or
import { isNull } from '@silen/is-null';

console.log(isNull(new Buffer(4)));
console.log(isNull(Buffer.alloc(4)));
console.log(isNull(undefined));
console.log(isNull(null));
console.log(isNull(''));
console.log(isNull(true));
console.log(isNull(0));
console.log(isNull(1));
console.log(isNull(1.0));
console.log(isNull('string'));
console.log(isNull({}));
console.log(isNull(function foo() {}));
console.log(isNull(Symbol()));
console.log(isNull(new Set));
console.log(isNull(new Map));
console.log(isNull(new WeakMap));
console.log(isNull(new WeakSet));

// or
console.log(window.Type.isNull(new WeakSet));

This is a demo for testing the usage of isNull from @silen/is-null module. You can try the others and do likewise.

others