Skip to content
/ NVL Public

๐Ÿšฎ Replace a blank value with fallback value.

License

Notifications You must be signed in to change notification settings

gluons/NVL

Repository files navigation

NVL

license npm npm TSLint Travis

๐Ÿšฎ Replace a blank value with fallback value.

Installation

npm install nvl
# Or Yarn
yarn add nvl

Usage

const nvl = require('nvl');

let notYet = void 0; // undefined
let nil = null;

nvl(notYet, true); // -> true
nvl(nil, 1); // -> 1
nvl([], [1]); // -> []
nvl({}, { a: 1, b: 2}); // -> {}
nvl(false, true); // -> false

About

๐Ÿšฎ Replace a blank value with fallback value.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published