object-has
Checks if path is a direct property of object.
Install
$ npm install --save object-has
Usage
For more use-cases see the tests
var has = ;var object = 'a': 'b': 'c': 3 4 ; ; // => true; // => true; // => false; // => true; // => false; // => true
Related
- object-at - Get object's property according to the path.
- object-set - Sets the value at path of object.
- object-unset - Removes the property at path of object.
- to-path - Converts string to a property path array.
Contributing
Pull requests and stars are highly welcome.
For bugs and feature requests, please create an issue.