How to use the es6-symbol/polyfill.iterator function in es6-symbol

To help you get started, we’ve selected a few es6-symbol examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github paypal / paypal-checkout-components / src / compat / polyfill.js View on Github external
/* @flow */

import Symbol from 'es6-symbol/polyfill';
import ArrayIterator from 'es6-iterator/array';
import { SyncPromise } from 'sync-browser-mocks/src/promise';

if (!window.Symbol) {
    window.Symbol = Symbol;
}

if (!Array.prototype[Symbol.iterator]) {
    Array.prototype[Symbol.iterator] = function iterator() { // eslint-disable-line
        return new ArrayIterator(this);
    };
}

window.Symbol = Symbol;

if (!window.Promise) {
    window.Promise = SyncPromise;
}
github paypal / paypal-checkout-components / src / compat / polyfill.js View on Github external
/* @flow */

import Symbol from 'es6-symbol/polyfill';
import ArrayIterator from 'es6-iterator/array';
import { SyncPromise } from 'sync-browser-mocks/src/promise';

if (!window.Symbol) {
    window.Symbol = Symbol;
}

if (!Array.prototype[Symbol.iterator]) {
    Array.prototype[Symbol.iterator] = function iterator() { // eslint-disable-line
        return new ArrayIterator(this);
    };
}

window.Symbol = Symbol;

if (!window.Promise) {
    window.Promise = SyncPromise;
}