https://github.com/codewell/is-empty
Check whether objects, arrays, strings etc. are empty or not.
https://github.com/codewell/is-empty
Last synced: 8 months ago
JSON representation
Check whether objects, arrays, strings etc. are empty or not.
- Host: GitHub
- URL: https://github.com/codewell/is-empty
- Owner: codewell
- Created: 2019-11-05T12:59:21.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2023-01-06T02:16:04.000Z (over 3 years ago)
- Last Synced: 2025-08-29T05:27:35.049Z (10 months ago)
- Language: JavaScript
- Size: 835 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 9
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# @codewell/is-empty
## Installation
```
npm install @codewell/is-empty
```
## Basic usage
```JavaScript
import isEmpty from '@codewell/is-empty';
isEmpty([]); // => true
isEmpty(''); // => true
isEmpty({}); // => true
isEmpty(['foo']); // => false
isEmpty('foo'); // => false
isEmpty({ foo: 'bar' }); // => false
```