Apply Defaults - A simple utility to apply default values to any object.
at github.com▼2 up and 1 down, posted by
2 up and 1 down, posted by
Based on your use of isNil, you consider null to be an invalid value, not just undefined? Is there a reason you differ from the spec?
You can check for the existence of a property with obj.hasOwnProperty('someProp').