v8is
Type checking on all sorts of values/objects
Note: v8is
is only supported on Node.js v4+.
Install
$ npm install v8is
Test
$ npm test
API
require it using:
const v8is =
The following functions are available:
NOTE: each function requires 1 argument. An error will be thrown otherwise
isUndefined(arg)
v8is // => truev8is // => false
isNull(arg)
v8is // => truev8is // => false
isTrue(arg)
v8is // => truev8is // => false
isFalse(arg)
isString(arg)
isSymbol(arg)
isFunction(arg)
isArray(arg)
isObject(arg)
isBoolean(arg)
isNumber(arg)
isInt32(arg)
isUint32(arg)
isDate(arg)
isArgumentsObject(arg)
isBooleanObject(arg)
isNumberObject(arg)
isStringObject(arg)
isError(arg)
Alias to isNativeError
isRegExp(arg)
isGeneratorFunction(arg)
isGeneratorObject(arg)
isPromise(arg)
only works for native promises
isMap(arg)
isSet(arg)
isMapIterator(arg)
isSetIterator(arg)
isWeakMap(arg)
isWeakSet(arg)
isArrayBuffer(arg)
isArrayBufferView(arg)
isTypedArray(arg)
isUint8Array(arg)
isUint8ClampedArray(arg)
isInt8Array(arg)
isUint16Array(arg)
isInt16Array(arg)
isUint32Array(arg)
isInt32Array(arg)
isFloat32Array(arg)
isFloat64Array(arg)
isDataView(arg)
isSharedArrayBuffer(arg)
isProxy(arg)
Only supported on Node.js v6+. One should check before trying to use this.
'use strict' const is = if isisProxy // ...
isWebAssemblyCompiledModule(arg)
Only supported on Node.js v7.0+. One should check before trying to use this.
isAsyncFunction(arg)
Only supported on Node.js v7.6+. One should check before trying to use this.
Author
Evan Lucas
License
MIT (See LICENSE
for more info)