@rocketstation/check-if-type

2.0.0 • Public • Published

Check If Type

Check If Type is based on just. It provides helpers to check if argument type is object, array, function

Installation

npm i @rocketstation/check-if-type

Usage

import * as checkIfType from '@rocketstation/check-if-type'

console.log(checkIfType.isObj({})) // true
console.log(checkIfType.isObj([])) // false
console.log(checkIfType.isObj(() => {})) // false

console.log(checkIfType.isArr({})) // false
console.log(checkIfType.isArr([])) // true
console.log(checkIfType.isArr(() => {})) // false

console.log(checkIfType.isFn({})) // false
console.log(checkIfType.isFn([])) // false
console.log(checkIfType.isFn(() => {})) // true

Motivation

We were tired of writing this code again and again

License

Check If Type is licensed under the MIT License

Created by RocketStation

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 2.0.0
    0
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 2.0.0
    0
  • 1.0.4
    0
  • 1.0.3
    0
  • 1.0.0
    1

Package Sidebar

Install

npm i @rocketstation/check-if-type

Weekly Downloads

0

Version

2.0.0

License

MIT

Unpacked Size

2.56 kB

Total Files

3

Last publish

Collaborators

  • oleksiibilous
  • oleksiipysanko