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

3.2.0 • 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'

/just-typeof/

    Package Sidebar

    Install

    npm i just-typeof

    Weekly Downloads

    2,933

    Version

    3.2.0

    License

    MIT

    Unpacked Size

    6.17 kB

    Total Files

    9

    Last publish

    Collaborators

    • angus-c