ponyfill.js 333 B

1234567891011121314151617
  1. export default function symbolObservablePonyfill(root) {
  2. var result;
  3. var Symbol = root.Symbol;
  4. if (typeof Symbol === 'function') {
  5. if (Symbol.observable) {
  6. result = Symbol.observable;
  7. } else {
  8. result = Symbol('observable');
  9. Symbol.observable = result;
  10. }
  11. } else {
  12. result = '@@observable';
  13. }
  14. return result;
  15. };