a zip code crypto-currency system good for red ONLY

iterator.js 1.3KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. /** PURE_IMPORTS_START .._util_root PURE_IMPORTS_END */
  2. import { root } from '../util/root';
  3. export function symbolIteratorPonyfill(root) {
  4. var Symbol = root.Symbol;
  5. if (typeof Symbol === 'function') {
  6. if (!Symbol.iterator) {
  7. Symbol.iterator = Symbol('iterator polyfill');
  8. }
  9. return Symbol.iterator;
  10. }
  11. else {
  12. // [for Mozilla Gecko 27-35:](https://mzl.la/2ewE1zC)
  13. var Set_1 = root.Set;
  14. if (Set_1 && typeof new Set_1()['@@iterator'] === 'function') {
  15. return '@@iterator';
  16. }
  17. var Map_1 = root.Map;
  18. // required for compatability with es6-shim
  19. if (Map_1) {
  20. var keys = Object.getOwnPropertyNames(Map_1.prototype);
  21. for (var i = 0; i < keys.length; ++i) {
  22. var key = keys[i];
  23. // according to spec, Map.prototype[@@iterator] and Map.orototype.entries must be equal.
  24. if (key !== 'entries' && key !== 'size' && Map_1.prototype[key] === Map_1.prototype['entries']) {
  25. return key;
  26. }
  27. }
  28. }
  29. return '@@iterator';
  30. }
  31. }
  32. export var iterator = /*@__PURE__*/ symbolIteratorPonyfill(root);
  33. /**
  34. * @deprecated use iterator instead
  35. */
  36. export var $$iterator = iterator;
  37. //# sourceMappingURL=iterator.js.map