has-data
v0.0.5
Published
Objects been checked wheather it's undified or null or Empty
Downloads
2
Readme
Description
has_data function is used to check the object is null
, undefined
, ''
(Empty), empty map
and set
and []
.
If we have data it will return true
else flase
.
Installation
$ npm install has-data
Usage of package
import { has_data } from '@rakeshsagalagatte/has_data'
# watch mode
console.log(has_data(Array.of(['2', '3']))) // result to true
console.log(has_data('a')) // result to true
console.log(has_data(23)) // result to true
console.log(has_data({ 'name':'abcd' })) // result to true
console.log(has_data('')) // result to flase
console.log(has_data(null)) // result to flase
console.log(has_data(undefined)) // result to flase
console.log(has_data([])) // result to flase