mirror of
https://github.com/moparisthebest/kaiwa
synced 2024-11-05 17:15:04 -05:00
11 lines
249 B
JavaScript
11 lines
249 B
JavaScript
"use strict";
|
|
|
|
// 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] || '';
|
|
}
|
|
};
|