https://github.com/kalwar/null_or_empty
A Node.js package that checks if a given string is null or empty.
https://github.com/kalwar/null_or_empty
empty-string null-check string strings
Last synced: about 1 year ago
JSON representation
A Node.js package that checks if a given string is null or empty.
- Host: GitHub
- URL: https://github.com/kalwar/null_or_empty
- Owner: kalwar
- License: mit
- Created: 2018-06-24T18:22:28.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2023-01-16T11:32:25.000Z (over 3 years ago)
- Last Synced: 2025-04-23T00:42:49.253Z (about 1 year ago)
- Topics: empty-string, null-check, string, strings
- Language: Shell
- Homepage:
- Size: 23.4 KB
- Stars: 0
- Watchers: 2
- Forks: 21
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# null_or_empty
[](https://github.com/kalwar/null_or_empty/actions/workflows/whatever.yml)
A simple Node.js package that checks, if a given string is null or empty.
## Usage
First, install the package using npm:
npm install @skalwar/null_or_empty --save
Then, require the package and use it like so:
var isNullOrEmpty = require('@skalwar/null_or_empty');
console.log(isNullOrEmpty("")); // true
console.log(isNullOrEmpty(null)); // true
console.log(isNullOrEmpty(undefined)); // true
console.log(isNullOrEmpty("Hello World")); // false
## License
MIT