@zidadindimon/js-typehelper
TypeScript icon, indicating that this package has built-in type declarations

1.0.17 • Public • Published

TypeHelper

Simple helper for check js type

Install

npm i @zidadindimon/js-typehelper

Usage

check type example:

import TypeHelper from "@zidadindimon/js-typehelper"
...
let data = [];
TypeHelper.isArray(data) // return true
TypeHelper.isObject(data) //return false

get type example:

import TypeHelper, {TYPE} from "@zidadindimon/js-typehelper"
TypeHelper.getType(data) //return  TYPE.ARRAY

check data is empty:

import TypeHelper from "@zidadindimon/js-typehelper"
TypeHelper.isEmpty({}) //return true
TypeHelper.isEmpty([]) //return true

Readme

Keywords

none

Package Sidebar

Install

npm i @zidadindimon/js-typehelper

Weekly Downloads

25

Version

1.0.17

License

ISC

Unpacked Size

349 kB

Total Files

15

Last publish

Collaborators

  • zidadindimon