Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nemanjapetrovic/is-null-or-undefined
Is a simple npm package to check if sent arguments are null or undefined.
https://github.com/nemanjapetrovic/is-null-or-undefined
is library npm null or undefined
Last synced: about 5 hours ago
JSON representation
Is a simple npm package to check if sent arguments are null or undefined.
- Host: GitHub
- URL: https://github.com/nemanjapetrovic/is-null-or-undefined
- Owner: nemanjapetrovic
- License: mit
- Created: 2020-07-01T21:17:29.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2021-05-18T07:52:29.000Z (over 3 years ago)
- Last Synced: 2025-01-02T00:34:10.997Z (17 days ago)
- Topics: is, library, npm, null, or, undefined
- Language: JavaScript
- Homepage:
- Size: 109 KB
- Stars: 0
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
# [@nempet/is-null-or-undefined](https://www.npmjs.com/package/@nempet/is-null-or-undefined)
Is a simple npm package to check if sent arguments are null or undefined.
Features:
- You can send as many arguments as you want to check in one run
- If one of the arguments is null or undefined it will return: `true`# Install
To install [@nempet/is-null-or-undefined](https://www.npmjs.com/package/@nempet/is-null-or-undefined) package just run:
```npm i @nempet/is-null-or-undefined```
# Usage examples
```
const isNullOrUndefined = require('is-null-or-undefined');
```**The following examples will always return: `false` as sent arguments are not NULL neither are Undefined**
```
isNullOrUndefined('1'); // will return falseisNullOrUndefined(2); // will return false
isNullOrUndefined({someInt: 123}); // will return false
isNullOrUndefined('1'); // will return false
isNullOrUndefined('1', 2, '3', {}, 4, 5); // will return false
isNullOrUndefined({ some: null }); // will return false
isNullOrUndefined({ some: undefined }); // will return false
```**The following examples will always return: `true` as sent arguments are either NULL or Undefined**
```
isNullOrUndefined('1', 2, '3', {}, null, 5); // will return trueisNullOrUndefined('1', 2, undefined, {}, 4, 5); // will return true
```# [Contribution](CONTRIBUTING)
Feel free to contribute by forking this repository, making changes, and submitting pull requests. For any questions or advice place an issue on this repository.
# License
[MIT](LICENSE)