mirror of
https://github.com/moparisthebest/kaiwa
synced 2024-11-15 05:55:01 -05:00
9 lines
234 B
JavaScript
9 lines
234 B
JavaScript
// get a property that's a function or direct property
|
|
module.exports = function (obj, propName) {
|
|
if (obj[propName] instanceof Function) {
|
|
return obj[propName]();
|
|
} else {
|
|
return obj[propName] || '';
|
|
}
|
|
};
|