Package Exports
- @silen/is-blob
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@silen/is-blob) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
is-blob
Determine if a value is Blob
install
npm i @silen/is-blob
api
declare function isBlob(val: any): boolean;
usage
const { isBlob } = require('@silen/is-blob');
// or
import { isBlob } from '@silen/is-blob';
console.log(isBlob(new Buffer(4)));
console.log(isBlob(Buffer.alloc(4)));
console.log(isBlob(undefined));
console.log(isBlob(null));
console.log(isBlob(''));
console.log(isBlob(true));
console.log(isBlob(0));
console.log(isBlob(1));
console.log(isBlob(1.0));
console.log(isBlob('string'));
console.log(isBlob({}));
console.log(isBlob(function foo() {}));
console.log(isBlob(Symbol()));
console.log(isBlob(new Set));
console.log(isBlob(new Map));
console.log(isBlob(new WeakMap));
console.log(isBlob(new WeakSet));
// or
console.log(window.Type.isBlob(new WeakSet));
This is a demo for testing the usage of isBlob
from @silen/is-blob
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
- isFunction
- isSymbol
- isRegExp
- isInt8Array
- isUint8Array
- isUint8ClampedArray
- isInt16Array
- isUint16Array
- isInt32Array
- isUint32Array
- isFloat32Array
- isFloat64Array
- isError
- isPromise
- isSet
- isWeakSet
- isMap
- isWeakMap
- isStream
- isURLSearchParams