has-data
TypeScript icon, indicating that this package has built-in type declarations

0.0.5 • Public • Published

Nest Logo

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

Readme

Keywords

none

Package Sidebar

Install

npm i has-data

Weekly Downloads

2

Version

0.0.5

License

MIT

Unpacked Size

40.5 kB

Total Files

6

Last publish

Collaborators

  • rakeshsagalagatte