get-result

Utility function for getting a named property from an object. If the named property is a function invoke it with the object as context and return the result, otherwise return the property.

get-result

Utility function for getting a named property from an object. If the named property is a function invoke it with the object as context and return the result, otherwise return the property.

Equivalent to _.result from underscore.js but published as a standalone Common JS module.

npm install get-result
var get-result = require('get-result');

Credit goes to Jeremy Ashkenas and the rest of the underscore authors.

If you like this follow @HenrikJoreteg on twitter.

MIT