NuGet Package Manager

    just-typeof
    TypeScript icon, indicating that this package has built-in type declarations

    3.0.1 • Public • Published

    just-typeof

    Part of a library of zero-dependency npm modules that do just do one thing. Guilt-free utilities for every occasion.

    🍦 Try it

    npm install just-typeof
    yarn add just-typeof

    Type inferer

    import typeOf from 'just-typeof';
    
    typeOf({}); // 'object'
    typeOf([]); // 'array'
    typeOf(function() {}); // 'function'
    typeOf(/a/); // 'regexp'
    typeOf(new Date()); // 'date'
    typeOf(null); // 'null'
    typeOf(undefined); // 'undefined'
    typeOf('a'); // 'string'
    typeOf(1); // 'number'
    typeOf(true); // 'boolean'

    Install

    npm i just-typeof

    DownloadsWeekly Downloads

    1,996

    Version

    3.0.1

    License

    MIT

    Unpacked Size

    5.7 kB

    Total Files

    8

    Last publish

    Collaborators

    • angus-c