2.0.0 • Published 5 years ago

@rocketstation/check-if-type v2.0.0

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

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

2.0.0

5 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.0

6 years ago

1.0.1

6 years ago