@julkwel/is-empty

1.0.2 • Public • Published

@julkwel/is-empty

Testing an array, string or int if is it empty null or 0

Installation :

yarn add @julkwel/is-empty or npm install @julkwel/is-empty

Usage :

const isEmpty = require("@julkwel/is-empty");

console.log(isEmpty("0")); // output : true
console.log(isEmpty("    ")); // output : true
console.log(isEmpty(null)); // output : true
console.log(isEmpty(new Map)); // output : true
console.log(isEmpty(new Set)); // output : true

console.log(isEmpty("10")); // output: false
console.log(isEmpty("a")); // output: false
console.log(isEmpty(new Map([1,2]))); // output : false
console.log(isEmpty(new Set([3,1]))); // output : false

Testing :

npm test or yarn test

Feel free to reach out to me.

/@julkwel/is-empty/

    Package Sidebar

    Install

    npm i @julkwel/is-empty

    Weekly Downloads

    0

    Version

    1.0.2

    License

    MIT

    Unpacked Size

    3.6 kB

    Total Files

    5

    Last publish

    Collaborators

    • julkwel