The primary export of pathval is an object which has the following methods:
hasProperty(object, name) - Checks whether an object has named property or numeric array index.
getPathInfo(object, path) - Returns an object with info indicating the value of the parent of that path, the name of the property we're retrieving and its value.
getPathValue(object, path) - Retrieves the value of a property at a given path inside an object'.
setPathValue(object, path, value) - Sets the value of a property at a given path inside an object and returns the object in which the property has been set.
var pathval = require('pathval');
.hasProperty(object, name)
var pathval = require('pathval');var obj = { prop: 'a value' };pathval.hasProperty(obj, 'prop'); // true