1.0.0 • Published 4 years ago

@andrewcaires/type v1.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
4 years ago

type

Determine the internal JavaScript [Class] of an object.

Installation

The module is now available on npm! npm i @andrewcaires/type

Example

import { type } from  '@andrewcaires/type';

type([]); // => 'array'

type(true); // => 'boolean'
type(false); // => 'boolean'

type(frunction() {}); // => 'function'

type(1); // => 'number'
type(1.7); // => 'number'

type({}); // => 'object'

type(''); // => 'string'
type('test'); // => 'string'

type(); // => 'null'
type(null); // => 'null'

Functions

  • isArray
  • isBoolean
  • isFunction
  • isNumber
  • isObject
  • isString
  • isFloat
  • isInteger
  • isNull
  • isUndefined
  • test
  • type

Links

License

1.0.0

4 years ago