UNPKG

497 BJavaScriptView Raw
1'use strict';
2
3Object.defineProperty(exports, '__esModule', {
4 value: true
5});
6exports.getName = getName;
7exports.getNameOrNull = getNameOrNull;
8exports.isObservable = isObservable;
9
10function getName(comp) {
11 return '' + (getNameOrNull(comp) || 'Anonymous');
12}
13
14function getNameOrNull(comp) {
15 return comp && comp.displayName || comp.constructor && comp.constructor.displayName || null;
16}
17
18function isObservable(observable) {
19 return observable && typeof observable.subscribe === 'function';
20}
\No newline at end of file