{
  "name": "es6-iterator",
  "version": "0.1.3",
  "description": "Iterator abstraction based on ES6 specification",
  "author": {
    "name": "Mariusz Nowak",
    "email": "medyk@medikoo.com",
    "url": "http://www.medikoo.com/"
  },
  "keywords": [
    "iterator",
    "array",
    "list",
    "set",
    "map",
    "generator"
  ],
  "repository": {
    "type": "git",
    "url": "git://github.com/medikoo/es6-iterator.git"
  },
  "dependencies": {
    "d": "~0.1.1",
    "es5-ext": "~0.10.5",
    "es6-symbol": "~2.0.1"
  },
  "devDependencies": {
    "event-emitter": "~0.3.3",
    "tad": "~0.2.1",
    "xlint": "~0.2.2",
    "xlint-jslint-medikoo": "~0.1.2"
  },
  "scripts": {
    "lint": "node node_modules/xlint/bin/xlint --linter=node_modules/xlint-jslint-medikoo/index.js --no-cache --no-stream",
    "lint-console": "node node_modules/xlint/bin/xlint --linter=node_modules/xlint-jslint-medikoo/index.js --watch",
    "test": "node ./node_modules/tad/bin/tad"
  },
  "license": "MIT",
  "readme": "# es6-iterator\n## ECMAScript 6 Iterator interface\n\n### Installation\n\n\t$ npm install es6-iterator\n\t\nTo port it to Browser or any other (non CJS) environment, use your favorite CJS bundler. No favorite yet? Try: [Browserify](http://browserify.org/), [Webmake](https://github.com/medikoo/modules-webmake) or [Webpack](http://webpack.github.io/)\n\n## API\n\n### Constructors\n\n#### Iterator(list) _(es6-iterator)_\n\nAbstract Iterator interface. Meant for extensions and not to be used on its own.\n\nAccepts any _list_ object (technically object with numeric _length_ property).\n\n_Mind it doesn't iterate strings properly, for that use dedicated [StringIterator](#string-iterator)_\n\n```javascript\nvar Iterator = require('es6-iterator')\nvar iterator = new Iterator([1, 2, 3]);\n\niterator.next(); // { value: 1, done: false }\niterator.next(); // { value: 2, done: false }\niterator.next(); // { value: 3, done: false }\niterator.next(); // { value: undefined, done: true }\n```\n\n\n#### ArrayIterator(arrayLike[, kind]) _(es6-iterator/array)_\n\nDedicated for arrays and array-likes. Supports three iteration kinds:\n* __value__ _(default)_ - Iterates values\n* __key__ - Iterates indexes\n* __key+value__ - Iterates keys and indexes, each iteration value is in _[key, value]_ form.\n\n\n```javascript\nvar ArrayIterator = require('es6-iterator/array')\nvar iterator = new ArrayIterator([1, 2, 3], 'key+value');\n\niterator.next(); // { value: [0, 1], done: false }\niterator.next(); // { value: [1, 2], done: false }\niterator.next(); // { value: [2, 3], done: false }\niterator.next(); // { value: undefined, done: true }\n```\n\nMay also be used for _arguments_ objects:\n\n```javascript\n(function () {\n  var iterator = new ArrayIterator(arguments);\n\n  iterator.next(); // { value: 1, done: false }\n  iterator.next(); // { value: 2, done: false }\n  iterator.next(); // { value: 3, done: false }\n  iterator.next(); // { value: undefined, done: true }\n}(1, 2, 3));\n```\n\n#### StringIterator(str) _(es6-iterator/string)_\n\nAssures proper iteration over unicode symbols.  \nSee: http://mathiasbynens.be/notes/javascript-unicode\n\n```javascript\nvar StringIterator = require('es6-iterator/string');\nvar iterator = new StringIterator('f🙈o🙉o🙊');\n\niterator.next(); // { value: 'f', done: false }\niterator.next(); // { value: '🙈', done: false }\niterator.next(); // { value: 'o', done: false }\niterator.next(); // { value: '🙉', done: false }\niterator.next(); // { value: 'o', done: false }\niterator.next(); // { value: '🙊', done: false }\niterator.next(); // { value: undefined, done: true }\n```\n\n### Function utilities\n\n#### forOf(iterable, callback[, thisArg]) _(es6-iterator/for-of)_\n\nPolyfill for ECMAScript 6 [`for...of`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for...of) statement.\n\n```\nvar forOf = require('es6-iterator/for-of');\nvar result = [];\n\nforOf('🙈🙉🙊', function (monkey) { result.push(monkey); });\nconsole.log(result); // ['🙈', '🙉', '🙊'];\n```\n\nOptionally you can break iteration at any point:\n\n```javascript\nvar result = [];\n\nforOf([1,2,3,4]', function (val, doBreak) {\n  result.push(monkey);\n  if (val >= 3) doBreak();\n});\nconsole.log(result); // [1, 2, 3];\n```\n\n#### get(obj) _(es6-iterator/get)_\n\nReturn iterator for any iterable object.\n\n```javascript\nvar getIterator = require('es6-iterator/get');\nvar iterator = get([1,2,3]);\n\niterator.next(); // { value: 1, done: false }\niterator.next(); // { value: 2, done: false }\niterator.next(); // { value: 3, done: false }\niterator.next(); // { value: undefined, done: true }\n```\n\n#### isIterable(obj) _(es6-iterator/is-iterable)_\n\nWhether _obj_ is iterable\n\n```javascript\nvar isIterable = require('es6-iterator/is-iterable');\n\nisIterable(null); // false\nisIterable(true); // false\nisIterable('str'); // true\nisIterable(['a', 'r', 'r']); // true\nisIterable(new ArrayIterator([])); // true\n```\n\n#### validIterable(obj) _(es6-iterator/valid-iterable)_\n\nIf _obj_ is an iterable it is returned. Otherwise _TypeError_ is thrown.\n\n### Method extensions\n\n#### iterator.chain(iterator1[, …iteratorn]) _(es6-iterator/#/chain)_\n\nChain multiple iterators into one.\n\n### Tests [![Build Status](https://travis-ci.org/medikoo/es6-iterator.png)](https://travis-ci.org/medikoo/es6-iterator)\n\n\t$ npm test\n",
  "readmeFilename": "README.md",
  "bugs": {
    "url": "https://github.com/medikoo/es6-iterator/issues"
  },
  "homepage": "https://github.com/medikoo/es6-iterator",
  "_id": "es6-iterator@0.1.3",
  "_shasum": "d6f58b8c4fc413c249b4baa19768f8e4d7c8944e",
  "_from": "es6-iterator@~0.1.3",
  "_resolved": "https://registry.npmjs.org/es6-iterator/-/es6-iterator-0.1.3.tgz"
}
