Nutty Peanut Marshmallow

    @silen/is-blob
    TypeScript icon, indicating that this package has built-in type declarations

    1.0.3 • Public • Published

    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

    Install

    npm i @silen/is-blob

    DownloadsWeekly Downloads

    4

    Version

    1.0.3

    License

    MIT

    Unpacked Size

    8.07 kB

    Total Files

    9

    Last publish

    Collaborators

    • silentsun