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