Package Exports
- deep-null-check
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (deep-null-check) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Deep null check
Checking JavaScript objects for null and undefined values for nested structure. It will return boolean values as an result for null/undefined check.
This module was created basically keeping JSON object in mind. The module is light-weight and dependency free.
Prerequisites
No prerequisites needed for this package. It is dependency free npm library
Installation
npm install --save deep-null-check
Usage:
To check null/undefined values on an object:
> var nullCheck = require('deep-null-check');
> var obj = {
... name: 'value',
... age: 1,
... Address: {
... city : null
... },
... isUndefined: undefined
... }
> console.log(nullCheck.deepNullCheck(obj));
Output : false
API
deepNullCheck(obj)
It return boolean value depends on null/undefined values in obj
true : IF no null/undefined exist
false : IF null/undefined exist
Arguments
obj
Object - The object refers to the JSON object.
Requirements
No additional requirements needed for this library
Authors
- Piyush Salunke - Initial work
Acknowledgments
- Inspiration
- Keep learning and keep contributing