Type checking on all sorts of values/objects
Note: v8is
is only supported on Node.js v4+.
$ npm install v8is
$ npm test
require it using:
const v8is = require('v8is')
The following functions are available:
NOTE: each function requires 1 argument. An error will be thrown otherwise
v8is.isUndefined(undefined) // => true
v8is.isUndefined(null) // => false
v8is.isNull(null) // => true
v8is.isNull(undefined) // => false
v8is.isTrue(true) // => true
v8is.isTrue(false) // => false
Alias to isNativeError
only works for native promises
Only supported on Node.js v6+. One should check before trying to use this.
'use strict'
const is = require('v8is')
if (is.isProxy) {
// ...
}
Only supported on Node.js v7.0+. One should check before trying to use this.
Only supported on Node.js v7.6+. One should check before trying to use this.
Evan Lucas
MIT (See LICENSE
for more info)