@amxdev/is-empty
Version:
Utility to check if a value is empty (null, undefined, string, array, or object)
19 lines (12 loc) • 347 B
Markdown
# is-empty
> A lightweight utility to check if a value is empty.
## Install
```bash
npm install /is-empty
import { isEmpty } from "@amxdev/is-empty";
isEmpty(null); // true
isEmpty(""); // true
isEmpty([]); // true
isEmpty({}); // true
isEmpty("hello"); // false
isEmpty([1, 2]); // false
/