Nutritious Polygonal Meatball

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

    1.0.3 • Public • Published

    is-uint16-array

    Determine if a value is Uint16Array

    install

    npm i @silen/is-uint16-array
    

    api

    • declare function isUint16Array(val: any): boolean;

    usage

    const { isUint16Array } = require('@silen/is-uint16-array');
    // or
    import { isUint16Array } from '@silen/is-uint16-array';
    
    console.log(isUint16Array(new Buffer(4)));
    console.log(isUint16Array(Buffer.alloc(4)));
    console.log(isUint16Array(undefined));
    console.log(isUint16Array(null));
    console.log(isUint16Array(''));
    console.log(isUint16Array(true));
    console.log(isUint16Array(0));
    console.log(isUint16Array(1));
    console.log(isUint16Array(1.0));
    console.log(isUint16Array('string'));
    console.log(isUint16Array({}));
    console.log(isUint16Array(function foo() {}));
    console.log(isUint16Array(Symbol()));
    console.log(isUint16Array(new Set));
    console.log(isUint16Array(new Map));
    console.log(isUint16Array(new WeakMap));
    console.log(isUint16Array(new WeakSet));
    
    // or
    console.log(window.Type.isUint16Array(new WeakSet));

    This is a demo for testing the usage of isUint16Array from @silen/is-uint16-array module. You can try the others and do likewise.

    others

    Install

    npm i @silen/is-uint16-array

    DownloadsWeekly Downloads

    182

    Version

    1.0.3

    License

    MIT

    Unpacked Size

    8.48 kB

    Total Files

    9

    Last publish

    Collaborators

    • silentsun