1
0
mirror of https://github.com/moparisthebest/kaiwa synced 2025-02-20 13:01:50 -05:00
kaiwa/clientapp/helpers/getOrCall.js

11 lines
249 B
JavaScript
Raw Normal View History

2013-08-29 20:38:28 -07:00
"use strict";
2013-06-03 15:51:30 -07:00
// 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] || '';
}
};