thundercats-react
Version:
Thundercats addon for use with React
20 lines (16 loc) • 497 B
JavaScript
Object.defineProperty(exports, '__esModule', {
value: true
});
exports.getName = getName;
exports.getNameOrNull = getNameOrNull;
exports.isObservable = isObservable;
function getName(comp) {
return '' + (getNameOrNull(comp) || 'Anonymous');
}
function getNameOrNull(comp) {
return comp && comp.displayName || comp.constructor && comp.constructor.displayName || null;
}
function isObservable(observable) {
return observable && typeof observable.subscribe === 'function';
}
;