numdefined
v1.0.0
Published
return the first argument that is not NaN.
Downloads
2
Readme
numdefined
return the first argument that is not NaN.
usage
const x = { y: 1, z: 'a' }
assert.equal(numdefined(x.a, x.y, x.z), 1)
assert.equal(numdefined('bla', 555), 555)
assert.equal(numdefined(x.b), undefined)