Rewrite `__iterator__` property ⇒ `_iterator_`

JavaScript pattern

Use _iterator_ instead of __iterator__. __iterator__ is obsolete and is not implemented by all browsers.


Apply with the Grit CLI
grit apply no_iterator

prototype.__iterator__ => _iterator_

BEFORE
Data.prototype.__iterator__ = function () {
  return new DataIterator(this);
};

var __iterator__ = function () {
  doIterator();
};
AFTER
Data._iterator_ = function () {
  return new DataIterator(this);
};

var __iterator__ = function () {
  doIterator();
};

prototype["__iterator__"] property => _iterator_

BEFORE
Data.prototype['__iterator__'] = function () {
  return new DataIterator(this);
};
AFTER
Data._iterator_ = function () {
  return new DataIterator(this);
};

__iterator__ => _iterator_

BEFORE
bar.__iterator__ = function () {
  doIterator();
};
AFTER
bar._iterator_ = function () {
  doIterator();
};

['__iterator__'] property => _iterator_

BEFORE
bar['__iterator__'] = function () {
  doIterator();
};
AFTER
bar._iterator_ = function () {
  doIterator();
};