@reactivex/rxjs
Version:
Reactive Extensions for modern JavaScript
33 lines • 1.2 kB
JavaScript
define(["require", "exports", '../util/root'], function (require, exports, root_1) {
"use strict";
var Symbol = root_1.root.Symbol;
if (typeof Symbol === 'function') {
if (Symbol.iterator) {
exports.$$iterator = Symbol.iterator;
}
else if (typeof Symbol.for === 'function') {
exports.$$iterator = Symbol.for('iterator');
}
}
else {
if (root_1.root.Set && typeof new root_1.root.Set()['@@iterator'] === 'function') {
// Bug for mozilla version
exports.$$iterator = '@@iterator';
}
else if (root_1.root.Map) {
// es6-shim specific logic
var keys = Object.getOwnPropertyNames(root_1.root.Map.prototype);
for (var i = 0; i < keys.length; ++i) {
var key = keys[i];
if (key !== 'entries' && key !== 'size' && root_1.root.Map.prototype[key] === root_1.root.Map.prototype['entries']) {
exports.$$iterator = key;
break;
}
}
}
else {
exports.$$iterator = '@@iterator';
}
}
});
//# sourceMappingURL=iterator.js.map