@zidadindimon/js-typehelper
v1.0.17
Published
jS helper for check js value type
Downloads
650
Readme
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