is-int8-array
Determine if a value is Int8Array
install
npm i @silen/is-int8-array
api
declare function isInt8Array(val: any): boolean;
usage
const { isInt8Array } = require('@silen/is-int8-array');
// or
import { isInt8Array } from '@silen/is-int8-array';
console.log(isInt8Array(new Buffer(4)));
console.log(isInt8Array(Buffer.alloc(4)));
console.log(isInt8Array(undefined));
console.log(isInt8Array(null));
console.log(isInt8Array(''));
console.log(isInt8Array(true));
console.log(isInt8Array(0));
console.log(isInt8Array(1));
console.log(isInt8Array(1.0));
console.log(isInt8Array('string'));
console.log(isInt8Array({}));
console.log(isInt8Array(function foo() {}));
console.log(isInt8Array(Symbol()));
console.log(isInt8Array(new Set));
console.log(isInt8Array(new Map));
console.log(isInt8Array(new WeakMap));
console.log(isInt8Array(new WeakSet));
// or
console.log(window.Type.isInt8Array(new WeakSet));
This is a demo for testing the usage of isInt8Array
from @silen/is-int8-array
module. You can try the others and do likewise.
others
- type
- isArray
- isUndefined
- isNull
- isBoolean
- isBuffer
- isArrayBuffer
- isFormData
- isArrayBufferView
- isString
- isNumber
- isObject
- isPlainObject
- isDate
- isArguments
- isFile
- isBlob
- isFunction
- isSymbol
- isRegExp
- isUint8Array
- isUint8ClampedArray
- isInt16Array
- isUint16Array
- isInt32Array
- isUint32Array
- isFloat32Array
- isFloat64Array
- isError
- isPromise
- isSet
- isWeakSet
- isMap
- isWeakMap
- isStream
- isURLSearchParams