result.js 291 Bytes Raw Blame History Permalink 1 2 3 4 5 6 7 8 9 10 11 12 13 14 var isFunction = require('../lang/isFunction'); function result(obj, prop) { var property = obj[prop]; if(property === undefined) { return; } return isFunction(property) ? property.call(obj) : property; } module.exports = result;