1.0.0 • Published 9 years ago
novl v1.0.0
NOVL
Fallback when a value is not Number.
Installation
Via NPM:
npm install novlVia Yarn:
yarn add novlUsage
const novl = require('novl');
// When a value is not Number, it will return fallback value.
let a = novl(null, 0); // a = 0
let b = novl({}, 'x'); // b = 'x'
// When a value is Number, it will return that value.
let c = novl(NaN, 1); // c = NaN 😂
let d = novl(100, [0, 1, 2]); // d = 100API
novl(value, fallbackValue)
value
A main value.
fallbackValue
A fallback value.
1.0.0
9 years ago
