Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/julkwel/is-empty
Javascript library for checking if an array, string or int is empty null or 0
https://github.com/julkwel/is-empty
array is-empty javascript javascript-library object string
Last synced: 15 days ago
JSON representation
Javascript library for checking if an array, string or int is empty null or 0
- Host: GitHub
- URL: https://github.com/julkwel/is-empty
- Owner: julkwel
- License: mit
- Created: 2022-05-10T02:46:23.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-05-17T13:46:29.000Z (over 2 years ago)
- Last Synced: 2024-04-26T12:03:55.292Z (7 months ago)
- Topics: array, is-empty, javascript, javascript-library, object, string
- Language: JavaScript
- Homepage:
- Size: 64.5 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# @julkwel/is-empty :madagascar:
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 : trueconsole.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.