@pakal/type-of
TypeScript icon, indicating that this package has built-in type declarations

0.2.1 • Public • Published

@pakal/type-of

Source Code Version MIT License Bundle Size TypeScript

Type Of is package from Pakal library

Install

$ yarn add @pakal/type-of

Or

$ npm install --save @pakal/type-of

Use

Module

import {
  $bigint,
  $boolean,
  $function,
  $null,
  $number,
  $object,
  $string,
  $symbol,
  $undefined,
  ITypeKeys,
  default as typeOf
} from '@pakal/type-of';

Browser

<script src="https://unpkg.com/@pakal/type-of/bundle.umd.min.js"></script>
let {
  $bigint,
  $boolean,
  $function,
  $null,
  $number,
  $object,
  $string,
  $symbol,
  $undefined,
  typeOf
} = _;

Examples

 typeOf('foo'); // => 'string'
 typeOf(Object('foo')); // => 'object'
 typeOf(null); // => 'null'
 typeOf(v => v); // => 'function'
 typeOf(SymbolPolyfill('foo')); // => 'object'
 typeOf(BigIntPolyfill(1)); // => 'object'

License

Copyright © Yisrael Eliev, Licensed under the MIT license.

Package Sidebar

Install

npm i @pakal/type-of

Weekly Downloads

16

Version

0.2.1

License

MIT

Unpacked Size

21 kB

Total Files

15

Last publish

Collaborators

  • yisraelx