Sha256: 313dffb91beba82c720ef803114dfc9ce180ac52fb87b6595fd7932c91ded263

Contents?: true

Size: 1.31 KB

Versions: 49

Compression:

Stored size: 1.31 KB

Contents

"use strict";
var root_1 = require('../util/root');
function symbolIteratorPonyfill(root) {
    var Symbol = root.Symbol;
    if (typeof Symbol === 'function') {
        if (!Symbol.iterator) {
            Symbol.iterator = Symbol('iterator polyfill');
        }
        return Symbol.iterator;
    }
    else {
        // [for Mozilla Gecko 27-35:](https://mzl.la/2ewE1zC)
        var Set_1 = root.Set;
        if (Set_1 && typeof new Set_1()['@@iterator'] === 'function') {
            return '@@iterator';
        }
        var Map_1 = root.Map;
        // required for compatability with es6-shim
        if (Map_1) {
            var keys = Object.getOwnPropertyNames(Map_1.prototype);
            for (var i = 0; i < keys.length; ++i) {
                var key = keys[i];
                // according to spec, Map.prototype[@@iterator] and Map.orototype.entries must be equal.
                if (key !== 'entries' && key !== 'size' && Map_1.prototype[key] === Map_1.prototype['entries']) {
                    return key;
                }
            }
        }
        return '@@iterator';
    }
}
exports.symbolIteratorPonyfill = symbolIteratorPonyfill;
exports.iterator = symbolIteratorPonyfill(root_1.root);
/**
 * @deprecated use iterator instead
 */
exports.$$iterator = exports.iterator;
//# sourceMappingURL=iterator.js.map

Version data entries

49 entries across 49 versions & 4 rubygems

Version Path
ilog-0.4.1 node_modules/rxjs/symbol/iterator.js
ilog-0.4.0 node_modules/rxjs/symbol/iterator.js
ilog-0.3.3 node_modules/rxjs/symbol/iterator.js
govuk_publishing_components-18.0.0 node_modules/rxjs/symbol/iterator.js
govuk_publishing_components-17.21.0 node_modules/rxjs/symbol/iterator.js
govuk_publishing_components-17.20.0 node_modules/rxjs/symbol/iterator.js
govuk_publishing_components-17.19.1 node_modules/rxjs/symbol/iterator.js
govuk_publishing_components-17.19.0 node_modules/rxjs/symbol/iterator.js
govuk_publishing_components-17.18.0 node_modules/rxjs/symbol/iterator.js
govuk_publishing_components-17.17.0 node_modules/rxjs/symbol/iterator.js
govuk_publishing_components-17.16.0 node_modules/rxjs/symbol/iterator.js
govuk_publishing_components-17.15.0 node_modules/rxjs/symbol/iterator.js
govuk_publishing_components-17.14.0 node_modules/rxjs/symbol/iterator.js
govuk_publishing_components-17.13.0 node_modules/rxjs/symbol/iterator.js
govuk_publishing_components-17.12.2 node_modules/rxjs/symbol/iterator.js
govuk_publishing_components-17.12.1 node_modules/rxjs/symbol/iterator.js
govuk_publishing_components-17.12.0 node_modules/rxjs/symbol/iterator.js
govuk_publishing_components-17.11.0 node_modules/rxjs/symbol/iterator.js
govuk_publishing_components-17.10.0 node_modules/rxjs/symbol/iterator.js
govuk_publishing_components-17.9.0 node_modules/rxjs/symbol/iterator.js