26 lines
718 B
JavaScript
26 lines
718 B
JavaScript
|
"use strict";
|
||
|
var root_1 = require('../util/root');
|
||
|
function getSymbolObservable(context) {
|
||
|
var $$observable;
|
||
|
var Symbol = context.Symbol;
|
||
|
if (typeof Symbol === 'function') {
|
||
|
if (Symbol.observable) {
|
||
|
$$observable = Symbol.observable;
|
||
|
}
|
||
|
else {
|
||
|
$$observable = Symbol('observable');
|
||
|
Symbol.observable = $$observable;
|
||
|
}
|
||
|
}
|
||
|
else {
|
||
|
$$observable = '@@observable';
|
||
|
}
|
||
|
return $$observable;
|
||
|
}
|
||
|
exports.getSymbolObservable = getSymbolObservable;
|
||
|
exports.observable = getSymbolObservable(root_1.root);
|
||
|
/**
|
||
|
* @deprecated use observable instead
|
||
|
*/
|
||
|
exports.$$observable = exports.observable;
|
||
|
//# sourceMappingURL=observable.js.map
|