@rabiepenpm/libero-nisi-voluptatem

1.0.0 • Public • Published

Khali (Khāli; meaning, Empty)

npm version install size npm downloads GitHub issues GitHub forks GitHub stars GitHub license Twitter

Simply check if your array, object, nested stuff, string, number, etc are empty or not.

Installation

  • with npm
    npm install @rabiepenpm/libero-nisi-voluptatem
  • with yarn
    yarn add @rabiepenpm/libero-nisi-voluptatem
  • with pnpm
    pnpm install @rabiepenpm/libero-nisi-voluptatem
  • with bun
    bun add @rabiepenpm/libero-nisi-voluptatem

Usage examples

import isEmpty from "@rabiepenpm/libero-nisi-voluptatem";

// Regular stuff
isEmpty([]);    // true
isEmpty({});    // true
isEmpty("");    // true
isEmpty(0);     // true

const arr = ["Dhaka", ["Uttara", [1, 2]]];
const obj = {
        city: "Dhaka",
        location: {
          latitude: "23.809473999508782",
          longitude: "90.4151957081839",
        },
      };

// It works with array or, object
isEmpty(arr[10]);           // true
isEmpty(obj["capital"]);    // true

isEmpty(arr); // false
isEmpty(obj); // false

// And of course it works with nested values
isEmpty(arr[0][100]);               // true
isEmpty(obj["location"]["area"]);   // true

isEmpty(arr[0][0]); // false
isEmpty(obj.city);  // false

API

isEmpty(value)

  • Returns boolean
  • Returns true if the value is empty else false.

Dependencies (3)

Dev Dependencies (0)

    Package Sidebar

    Install

    npm i @rabiepenpm/libero-nisi-voluptatem

    Weekly Downloads

    1

    Version

    1.0.0

    License

    MIT

    Unpacked Size

    8.55 kB

    Total Files

    10

    Last publish

    Collaborators

    • cungkhai1992