Skip to content

Commit

Permalink
Make shimmed ArrayIterator private.
Browse files Browse the repository at this point in the history
Closes #252
  • Loading branch information
cscott committed Jun 4, 2014
1 parent b3fed1a commit 905bed3
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions es6-shim.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@
var _indexOf = String.prototype.indexOf;
var _toString = Object.prototype.toString;
var _hasOwnProperty = Object.prototype.hasOwnProperty;
var ArrayIterator; // make our implementation private

// Define configurable, writable and non-enumerable props
// if they don’t exist.
Expand Down Expand Up @@ -578,13 +579,13 @@
}
});

defineProperties(globals, {
ArrayIterator: function(array, kind) {
// Our ArrayIterator is private; see
// https://github.com/paulmillr/es6-shim/issues/252
ArrayIterator = function(array, kind) {
this.i = 0;
this.array = array;
this.kind = kind;
}
});
};

defineProperties(ArrayIterator.prototype, {
next: function() {
Expand Down

0 comments on commit 905bed3

Please sign in to comment.