JSPM

@silen/is-blob

1.0.3
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 2
  • Score
    100M100P100Q36129F
  • License MIT

Check if the parameter is blob

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