0.2.1 • Published 5 years ago

@pakal/type-of v0.2.1

Weekly downloads
6
License
MIT
Repository
github
Last release
5 years ago

@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.