@silen/is-float32-array
v1.0.3
Published
Check if the parameter is float32array
Downloads
10
Maintainers
Readme
is-float32-array
Determine if a value is Float32Array
install
npm i @silen/is-float32-array
api
declare function isFloat32Array(val: any): boolean;
usage
const { isFloat32Array } = require('@silen/is-float32-array');
// or
import { isFloat32Array } from '@silen/is-float32-array';
console.log(isFloat32Array(new Buffer(4)));
console.log(isFloat32Array(Buffer.alloc(4)));
console.log(isFloat32Array(undefined));
console.log(isFloat32Array(null));
console.log(isFloat32Array(''));
console.log(isFloat32Array(true));
console.log(isFloat32Array(0));
console.log(isFloat32Array(1));
console.log(isFloat32Array(1.0));
console.log(isFloat32Array('string'));
console.log(isFloat32Array({}));
console.log(isFloat32Array(function foo() {}));
console.log(isFloat32Array(Symbol()));
console.log(isFloat32Array(new Set));
console.log(isFloat32Array(new Map));
console.log(isFloat32Array(new WeakMap));
console.log(isFloat32Array(new WeakSet));
// or
console.log(window.Type.isFloat32Array(new WeakSet));
This is a demo for testing the usage of isFloat32Array
from @silen/is-float32-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
- isInt8Array
- isUint8Array
- isUint8ClampedArray
- isInt16Array
- isUint16Array
- isInt32Array
- isUint32Array
- isFloat64Array
- isError
- isPromise
- isSet
- isWeakSet
- isMap
- isWeakMap
- isStream
- isURLSearchParams