nuller
Nuller is a small and simple library for providing default values for null or undefined object property access
Usage
nuller function can take parameters partially, first by providing the fallback object, and later to provide a real object.
; const withFallback = ; const originalObject = name: 'John' location: null; const object = ; console;// User John Galt lives in unknown location
; const fallbackObject = name: 'John' lastName: 'Galt' location: 'unknown'; const originalObject = name: 'John' location: null; const object = ; console;// User John Galt lives in unknown location
Installation
This module is distributed via npm
and should be installed as your project's "dependencies"
npm install --save nuller
License
MIT © Ensar Bavrk