Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

is-nil

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

is-nil - npm Package Compare versions

Comparing version 0.0.0 to 1.0.0

index.js

41

package.json
{
"name": "is-nil",
"version": "0.0.0",
"description": "Checks if value is null or undefined.",
"version": "1.0.0",
"description": "Checks if the given value is null or undefined",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
"lint": "jshint index.js",
"pretest": "npm run lint",
"test": "mocha -R spec",
"test:cov": "rm -rf ./test/coverage && istanbul cover _mocha --dir ./test/coverage -- -R spec",
"test:rpt": "npm run test:cov && coveralls < ./test/coverage/lcov.info",
"prepublish": "npm test"
},
"repository": {
"type": "git",
"url": "git+https://github.com/bubkoo/is-nil.git"
},
"keywords": [
"check",
"checks",
"is",
"nil",
"detect",
"value",
"type",
"null",
"undefined"
"undefined",
"void"
],
"author": "bubkoo <bubkoo.wy@gmail.com> (https://github.com/bubkoo)",
"author": {
"name": "bubkoo",
"email": "bubkoo.wy@gmail.com"
},
"license": "MIT",
"repository": {
"type": "git",
"url": "git+https://github.com/bubkoo/is-nil.git"
},
"bugs": {
"url": "https://github.com/bubkoo/is-nil/issues"
},
"homepage": "https://github.com/bubkoo/is-nil#readme"
"homepage": "https://github.com/bubkoo/is-nil#readme",
"devDependencies": {
"jshint": "^2.9.1",
"chai": "^3.5.0",
"coveralls": "^2.11.9",
"istanbul": "^0.4.2",
"mocha": "^2.4.5"
}
}
# is-nil
Checks if value is null or undefined.
> Checks if the given value is null or undefined.
[![MIT License](https://img.shields.io/badge/license-MIT_License-green.svg?style=flat-square)](https://github.com/bubkoo/is-nil/blob/master/LICENSE)
[![build:?](https://img.shields.io/travis/bubkoo/is-nil/master.svg?style=flat-square)](https://travis-ci.org/bubkoo/is-nil)
[![coverage:?](https://img.shields.io/coveralls/bubkoo/is-nil/master.svg?style=flat-square)](https://coveralls.io/github/bubkoo/is-nil)
## Install
```
$ npm install --save is-nil
```
## Usage
```js
var isNil = require('is-nil');
isNil(null); // => true
isNil(void 0); // => true
isNil('abc'); // => false
isNil(123); // => false
isNil(true); // => false
isNil(false); // => false
isNil({}); // => false
isNil([]); // => false
isNil(NAN); // => false
```
## Related
- [is-null](https://github.com/bubkoo/is-null) - Checks if the given value is null.
- [is-window](https://github.com/bubkoo/is-window) - Checks if the given value is a window object.
- [is-native](https://github.com/bubkoo/is-native) - Checks if the given value is a native function.
- [is-array-like](https://github.com/bubkoo/is-array-like) - Checks if the given value is an array or an array-like object.
- [is-index](https://github.com/bubkoo/is-index) - Checks if the given value is a valid array-like index.
- [is-length](https://github.com/bubkoo/is-length) - Checks if the given value is a valid array-like length.
## Contributing
Pull requests and stars are highly welcome.
For bugs and feature requests, please [create an issue](https://github.com/bubkoo/is-nil/issues/new).
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc