Skip to content
Subhajit Sahu edited this page Aug 9, 2022 · 3 revisions

Check if value is a number.


function is(v)
// v: a value

const xnumber = require('extra-number');


xnumber.is(3.14);
// → true

xnumber.is(NaN);
// → true (an unexpressable number)

xnumber.is('3.14');
// → false

xnumber.is({'value': 3.14});
// → false

xnumber.is(null);
// → false


References

Clone this wiki locally