ponyfill.js 446 B

1234567891011121314151617181920212223
  1. 'use strict';
  2. Object.defineProperty(exports, "__esModule", {
  3. value: true
  4. });
  5. exports.default = symbolObservablePonyfill;
  6. function symbolObservablePonyfill(root) {
  7. var result;
  8. var _Symbol = root.Symbol;
  9. if (typeof _Symbol === 'function') {
  10. if (_Symbol.observable) {
  11. result = _Symbol.observable;
  12. } else {
  13. result = _Symbol('observable');
  14. _Symbol.observable = result;
  15. }
  16. } else {
  17. result = '@@observable';
  18. }
  19. return result;
  20. };