1
0
mirror of https://github.com/moparisthebest/kaiwa synced 2024-12-26 01:18:59 -05:00
kaiwa/clientapp/helpers/getOrCall.js

11 lines
249 B
JavaScript
Raw Normal View History

2013-08-29 23:38:28 -04:00
"use strict";
2013-06-03 18:51:30 -04: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] || '';
}
};