{"maintainers":[{"name":"isaacs","email":"i@izs.me"}],"dist-tags":{"latest":"3.0.2"},"author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"http://blog.izs.me/"},"description":"Yet Another Linked List","readme":"# yallist\n\nYet Another Linked List\n\nThere are many doubly-linked list implementations like it, but this\none is mine.\n\nFor when an array would be too big, and a Map can't be iterated in\nreverse order.\n\n\n[![Build Status](https://travis-ci.org/isaacs/yallist.svg?branch=master)](https://travis-ci.org/isaacs/yallist) [![Coverage Status](https://coveralls.io/repos/isaacs/yallist/badge.svg?service=github)](https://coveralls.io/github/isaacs/yallist)\n\n## basic usage\n\n```javascript\nvar yallist = require('yallist')\nvar myList = yallist.create([1, 2, 3])\nmyList.push('foo')\nmyList.unshift('bar')\n// of course pop() and shift() are there, too\nconsole.log(myList.toArray()) // ['bar', 1, 2, 3, 'foo']\nmyList.forEach(function (k) {\n  // walk the list head to tail\n})\nmyList.forEachReverse(function (k, index, list) {\n  // walk the list tail to head\n})\nvar myDoubledList = myList.map(function (k) {\n  return k + k\n})\n// now myDoubledList contains ['barbar', 2, 4, 6, 'foofoo']\n// mapReverse is also a thing\nvar myDoubledListReverse = myList.mapReverse(function (k) {\n  return k + k\n}) // ['foofoo', 6, 4, 2, 'barbar']\n\nvar reduced = myList.reduce(function (set, entry) {\n  set += entry\n  return set\n}, 'start')\nconsole.log(reduced) // 'startfoo123bar'\n```\n\n## api\n\nThe whole API is considered \"public\".\n\nFunctions with the same name as an Array method work more or less the\nsame way.\n\nThere's reverse versions of most things because that's the point.\n\n### Yallist\n\nDefault export, the class that holds and manages a list.\n\nCall it with either a forEach-able (like an array) or a set of\narguments, to initialize the list.\n\nThe Array-ish methods all act like you'd expect.  No magic length,\nthough, so if you change that it won't automatically prune or add\nempty spots.\n\n### Yallist.create(..)\n\nAlias for Yallist function.  Some people like factories.\n\n#### yallist.head\n\nThe first node in the list\n\n#### yallist.tail\n\nThe last node in the list\n\n#### yallist.length\n\nThe number of nodes in the list.  (Change this at your peril.  It is\nnot magic like Array length.)\n\n#### yallist.toArray()\n\nConvert the list to an array.\n\n#### yallist.forEach(fn, [thisp])\n\nCall a function on each item in the list.\n\n#### yallist.forEachReverse(fn, [thisp])\n\nCall a function on each item in the list, in reverse order.\n\n#### yallist.get(n)\n\nGet the data at position `n` in the list.  If you use this a lot,\nprobably better off just using an Array.\n\n#### yallist.getReverse(n)\n\nGet the data at position `n`, counting from the tail.\n\n#### yallist.map(fn, thisp)\n\nCreate a new Yallist with the result of calling the function on each\nitem.\n\n#### yallist.mapReverse(fn, thisp)\n\nSame as `map`, but in reverse.\n\n#### yallist.pop()\n\nGet the data from the list tail, and remove the tail from the list.\n\n#### yallist.push(item, ...)\n\nInsert one or more items to the tail of the list.\n\n#### yallist.reduce(fn, initialValue)\n\nLike Array.reduce.\n\n#### yallist.reduceReverse\n\nLike Array.reduce, but in reverse.\n\n#### yallist.reverse\n\nReverse the list in place.\n\n#### yallist.shift()\n\nGet the data from the list head, and remove the head from the list.\n\n#### yallist.slice([from], [to])\n\nJust like Array.slice, but returns a new Yallist.\n\n#### yallist.sliceReverse([from], [to])\n\nJust like yallist.slice, but the result is returned in reverse.\n\n#### yallist.toArray()\n\nCreate an array representation of the list.\n\n#### yallist.toArrayReverse()\n\nCreate a reversed array representation of the list.\n\n#### yallist.unshift(item, ...)\n\nInsert one or more items to the head of the list.\n\n#### yallist.unshiftNode(node)\n\nMove a Node object to the front of the list.  (That is, pull it out of\nwherever it lives, and make it the new head.)\n\nIf the node belongs to a different list, then that list will remove it\nfirst.\n\n#### yallist.pushNode(node)\n\nMove a Node object to the end of the list.  (That is, pull it out of\nwherever it lives, and make it the new tail.)\n\nIf the node belongs to a list already, then that list will remove it\nfirst.\n\n#### yallist.removeNode(node)\n\nRemove a node from the list, preserving referential integrity of head\nand tail and other nodes.\n\nWill throw an error if you try to have a list remove a node that\ndoesn't belong to it.\n\n### Yallist.Node\n\nThe class that holds the data and is actually the list.\n\nCall with `var n = new Node(value, previousNode, nextNode)`\n\nNote that if you do direct operations on Nodes themselves, it's very\neasy to get into weird states where the list is broken.  Be careful :)\n\n#### node.next\n\nThe next node in the list.\n\n#### node.prev\n\nThe previous node in the list.\n\n#### node.value\n\nThe data the node contains.\n\n#### node.list\n\nThe list to which this node belongs.  (Null if it does not belong to\nany list.)\n","repository":{"type":"git","url":"git+https://github.com/isaacs/yallist.git"},"users":{"joaquin.briceno":true,"f3lang":true,"ssljivic":true},"bugs":{"url":"https://github.com/isaacs/yallist/issues"},"license":"ISC","versions":{"1.0.0":{"name":"yallist","version":"1.0.0","description":"Yet Another Linked List","main":"yallist.js","directories":{"test":"test"},"dependencies":{},"devDependencies":{"tap":"^2.3.2"},"scripts":{"test":"tap test/*.js --cov"},"repository":{"type":"git","url":"git+https://github.com/isaacs/yallist.git"},"author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"http://blog.izs.me/"},"license":"ISC","gitHead":"8d387d3d66afcd9045a98c86f320016c4e1fee9c","bugs":{"url":"https://github.com/isaacs/yallist/issues"},"homepage":"https://github.com/isaacs/yallist#readme","_id":"yallist@1.0.0","_shasum":"478c1272847a661519938e3a43b98d00faa12f8a","_from":".","_npmVersion":"3.3.2","_nodeVersion":"4.0.0","_npmUser":{"name":"isaacs","email":"i@izs.me"},"dist":{"shasum":"478c1272847a661519938e3a43b98d00faa12f8a","tarball":"http://nexus.dui88.com:8081/nexus/content/groups/npm-all/yallist/-/yallist-1.0.0.tgz"},"maintainers":[{"name":"isaacs","email":"i@izs.me"}]},"1.0.1":{"name":"yallist","version":"1.0.1","description":"Yet Another Linked List","main":"yallist.js","directories":{"test":"test"},"dependencies":{},"devDependencies":{"tap":"^2.3.2"},"scripts":{"test":"tap test/*.js --cov"},"repository":{"type":"git","url":"git+https://github.com/isaacs/yallist.git"},"author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"http://blog.izs.me/"},"license":"ISC","gitHead":"071c8f329cb87dd996b360955a1a1a5199d1381a","bugs":{"url":"https://github.com/isaacs/yallist/issues"},"homepage":"https://github.com/isaacs/yallist#readme","_id":"yallist@1.0.1","_shasum":"daa8df3166c72bc78c3d307ea8195c1c14a1430c","_from":".","_npmVersion":"3.3.2","_nodeVersion":"4.0.0","_npmUser":{"name":"isaacs","email":"i@izs.me"},"dist":{"shasum":"daa8df3166c72bc78c3d307ea8195c1c14a1430c","tarball":"http://nexus.dui88.com:8081/nexus/content/groups/npm-all/yallist/-/yallist-1.0.1.tgz"},"maintainers":[{"name":"isaacs","email":"i@izs.me"}]},"1.0.2":{"name":"yallist","version":"1.0.2","description":"Yet Another Linked List","main":"yallist.js","directories":{"test":"test"},"dependencies":{},"devDependencies":{"tap":"^2.3.2"},"scripts":{"test":"tap test/*.js --cov"},"repository":{"type":"git","url":"git+https://github.com/isaacs/yallist.git"},"author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"http://blog.izs.me/"},"license":"ISC","gitHead":"56757373ff05e416992e323184946019db198759","bugs":{"url":"https://github.com/isaacs/yallist/issues"},"homepage":"https://github.com/isaacs/yallist#readme","_id":"yallist@1.0.2","_shasum":"2805e1ba9e78bac506a19c4e028d7da6d031adef","_from":".","_npmVersion":"3.3.2","_nodeVersion":"4.0.0","_npmUser":{"name":"isaacs","email":"i@izs.me"},"dist":{"shasum":"2805e1ba9e78bac506a19c4e028d7da6d031adef","tarball":"http://nexus.dui88.com:8081/nexus/content/groups/npm-all/yallist/-/yallist-1.0.2.tgz"},"maintainers":[{"name":"isaacs","email":"i@izs.me"}]},"1.1.0":{"name":"yallist","version":"1.1.0","description":"Yet Another Linked List","main":"yallist.js","directories":{"test":"test"},"dependencies":{},"devDependencies":{"tap":"^2.3.2"},"scripts":{"test":"tap test/*.js --cov"},"repository":{"type":"git","url":"git+https://github.com/isaacs/yallist.git"},"author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"http://blog.izs.me/"},"license":"ISC","gitHead":"2f324037e84a1ffb140d485e3b18f7e915937132","bugs":{"url":"https://github.com/isaacs/yallist/issues"},"homepage":"https://github.com/isaacs/yallist#readme","_id":"yallist@1.1.0","_shasum":"f1878f30e2955a6da83ac6f179782344cd6ea4fe","_from":".","_npmVersion":"3.3.2","_nodeVersion":"4.0.0","_npmUser":{"name":"isaacs","email":"i@izs.me"},"dist":{"shasum":"f1878f30e2955a6da83ac6f179782344cd6ea4fe","tarball":"http://nexus.dui88.com:8081/nexus/content/groups/npm-all/yallist/-/yallist-1.1.0.tgz"},"maintainers":[{"name":"isaacs","email":"i@izs.me"}]},"2.0.0":{"name":"yallist","version":"2.0.0","description":"Yet Another Linked List","main":"yallist.js","directories":{"test":"test"},"dependencies":{},"devDependencies":{"tap":"^2.3.2"},"scripts":{"test":"tap test/*.js --cov"},"repository":{"type":"git","url":"git+https://github.com/isaacs/yallist.git"},"author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"http://blog.izs.me/"},"license":"ISC","gitHead":"702eaba87deefa9f8fc2f8e36cb225bc2141fdc3","bugs":{"url":"https://github.com/isaacs/yallist/issues"},"homepage":"https://github.com/isaacs/yallist#readme","_id":"yallist@2.0.0","_shasum":"306c543835f09ee1a4cb23b7bce9ab341c91cdd4","_from":".","_npmVersion":"3.3.2","_nodeVersion":"4.0.0","_npmUser":{"name":"isaacs","email":"i@izs.me"},"dist":{"shasum":"306c543835f09ee1a4cb23b7bce9ab341c91cdd4","tarball":"http://nexus.dui88.com:8081/nexus/content/groups/npm-all/yallist/-/yallist-2.0.0.tgz"},"maintainers":[{"name":"isaacs","email":"i@izs.me"}]},"2.0.1":{"name":"yallist","version":"2.0.1","description":"Yet Another Linked List","main":"yallist.js","directories":{"test":"test"},"dependencies":{},"devDependencies":{"standard":"^5.4.1","tap":"^2.3.2"},"scripts":{"test":"tap test/*.js --cov","posttest":"standard -F *.js test/*.js","preversion":"npm test","postversion":"npm publish","postpublish":"git push origin --all; git push origin --tags"},"repository":{"type":"git","url":"git+https://github.com/isaacs/yallist.git"},"author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"http://blog.izs.me/"},"license":"ISC","gitHead":"64016921aae7ec4bd6d2d3e8c9f49d02529d9c3c","bugs":{"url":"https://github.com/isaacs/yallist/issues"},"homepage":"https://github.com/isaacs/yallist#readme","_id":"yallist@2.0.1","_shasum":"6c11279640abd6ed0a86dd32ed56b03caa9df4f1","_from":".","_npmVersion":"4.3.0","_nodeVersion":"8.0.0-pre","_npmUser":{"name":"isaacs","email":"i@izs.me"},"dist":{"shasum":"6c11279640abd6ed0a86dd32ed56b03caa9df4f1","tarball":"http://nexus.dui88.com:8081/nexus/content/groups/npm-all/yallist/-/yallist-2.0.1.tgz"},"maintainers":[{"name":"isaacs","email":"i@izs.me"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/yallist-2.0.1.tgz_1489262957872_0.8242232573684305"}},"2.1.0":{"name":"yallist","version":"2.1.0","description":"Yet Another Linked List","main":"yallist.js","directories":{"test":"test"},"files":["yallist.js","iterator.js"],"dependencies":{},"devDependencies":{"tap":"^10.3.0"},"scripts":{"test":"tap test/*.js --100","preversion":"npm test","postversion":"npm publish","postpublish":"git push origin --all; git push origin --tags"},"repository":{"type":"git","url":"git+https://github.com/isaacs/yallist.git"},"author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"http://blog.izs.me/"},"license":"ISC","gitHead":"ce5fe86dc1e550835941d33ce134e0632e7b6287","bugs":{"url":"https://github.com/isaacs/yallist/issues"},"homepage":"https://github.com/isaacs/yallist#readme","_id":"yallist@2.1.0","_shasum":"3a0f3b45f42cb60f822c92f69ade2bb88beb1ae0","_from":".","_npmVersion":"4.3.0","_nodeVersion":"8.0.0-pre","_npmUser":{"name":"isaacs","email":"i@izs.me"},"dist":{"shasum":"3a0f3b45f42cb60f822c92f69ade2bb88beb1ae0","tarball":"http://nexus.dui88.com:8081/nexus/content/groups/npm-all/yallist/-/yallist-2.1.0.tgz"},"maintainers":[{"name":"isaacs","email":"i@izs.me"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/yallist-2.1.0.tgz_1489370626750_0.8869737309869379"}},"2.1.1":{"name":"yallist","version":"2.1.1","description":"Yet Another Linked List","main":"yallist.js","directories":{"test":"test"},"files":["yallist.js","iterator.js"],"dependencies":{},"devDependencies":{"tap":"^10.3.0"},"scripts":{"test":"tap test/*.js --100","preversion":"npm test","postversion":"npm publish","postpublish":"git push origin --all; git push origin --tags"},"repository":{"type":"git","url":"git+https://github.com/isaacs/yallist.git"},"author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"http://blog.izs.me/"},"license":"ISC","gitHead":"9493a5b7460dd38dc3d3d488c92eae8a395efce3","bugs":{"url":"https://github.com/isaacs/yallist/issues"},"homepage":"https://github.com/isaacs/yallist#readme","_id":"yallist@2.1.1","_shasum":"08309c7044b1761d5e1591dc12c67629271b6ac3","_from":".","_npmVersion":"4.3.0","_nodeVersion":"8.0.0-pre","_npmUser":{"name":"isaacs","email":"i@izs.me"},"dist":{"shasum":"08309c7044b1761d5e1591dc12c67629271b6ac3","tarball":"http://nexus.dui88.com:8081/nexus/content/groups/npm-all/yallist/-/yallist-2.1.1.tgz"},"maintainers":[{"name":"isaacs","email":"i@izs.me"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/yallist-2.1.1.tgz_1489424134677_0.7357181606348604"}},"3.0.0":{"name":"yallist","version":"3.0.0","description":"Yet Another Linked List","main":"yallist.js","directories":{"test":"test"},"files":["yallist.js","iterator.js"],"dependencies":{},"devDependencies":{"tap":"^10.3.0"},"scripts":{"test":"tap test/*.js --100","preversion":"npm test","postversion":"npm publish","postpublish":"git push origin --all; git push origin --tags"},"repository":{"type":"git","url":"git+https://github.com/isaacs/yallist.git"},"author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"http://blog.izs.me/"},"license":"ISC","gitHead":"68fb6bd20e99f78dcd8cc299ebe8ba98fc726ff0","bugs":{"url":"https://github.com/isaacs/yallist/issues"},"homepage":"https://github.com/isaacs/yallist#readme","_id":"yallist@3.0.0","_shasum":"717369f9df727e5a03cc69c9ca94d7d94579f58c","_from":".","_npmVersion":"4.3.0","_nodeVersion":"8.0.0-pre","_npmUser":{"name":"isaacs","email":"i@izs.me"},"dist":{"shasum":"717369f9df727e5a03cc69c9ca94d7d94579f58c","tarball":"http://nexus.dui88.com:8081/nexus/content/groups/npm-all/yallist/-/yallist-3.0.0.tgz"},"maintainers":[{"name":"isaacs","email":"i@izs.me"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/yallist-3.0.0.tgz_1489424212365_0.014271438587456942"}},"3.0.1":{"name":"yallist","version":"3.0.1","description":"Yet Another Linked List","main":"yallist.js","directories":{"test":"test"},"files":["yallist.js","iterator.js"],"dependencies":{},"devDependencies":{"tap":"^10.3.0"},"scripts":{"test":"tap test/*.js --100","preversion":"npm test","postversion":"npm publish","postpublish":"git push origin --all; git push origin --tags"},"repository":{"type":"git","url":"git+https://github.com/isaacs/yallist.git"},"author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"http://blog.izs.me/"},"license":"ISC","gitHead":"a0c17647ac41f86adb875af76d2f522462785ffb","bugs":{"url":"https://github.com/isaacs/yallist/issues"},"homepage":"https://github.com/isaacs/yallist#readme","_id":"yallist@3.0.1","_shasum":"4affa89763ea5c2aeb9e2ed98387ceada34f4c4d","_from":".","_npmVersion":"4.3.0","_nodeVersion":"8.0.0-pre","_npmUser":{"name":"isaacs","email":"i@izs.me"},"dist":{"shasum":"4affa89763ea5c2aeb9e2ed98387ceada34f4c4d","tarball":"http://nexus.dui88.com:8081/nexus/content/groups/npm-all/yallist/-/yallist-3.0.1.tgz"},"maintainers":[{"name":"isaacs","email":"i@izs.me"}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/yallist-3.0.1.tgz_1489443153380_0.10298502212390304"}},"2.1.2":{"name":"yallist","version":"2.1.2","description":"Yet Another Linked List","main":"yallist.js","directories":{"test":"test"},"files":["yallist.js","iterator.js"],"dependencies":{},"devDependencies":{"tap":"^10.3.0"},"scripts":{"test":"tap test/*.js --100","preversion":"npm test","postversion":"npm publish","postpublish":"git push origin --all; git push origin --tags"},"repository":{"type":"git","url":"git+https://github.com/isaacs/yallist.git"},"author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"http://blog.izs.me/"},"license":"ISC","gitHead":"566cd4cd1e2ce57ffa84e295981cd9aa72319391","bugs":{"url":"https://github.com/isaacs/yallist/issues"},"homepage":"https://github.com/isaacs/yallist#readme","_id":"yallist@2.1.2","_shasum":"1c11f9218f076089a47dd512f93c6699a6a81d52","_from":".","_npmVersion":"4.3.0","_nodeVersion":"8.0.0-pre","_npmUser":{"name":"isaacs","email":"i@izs.me"},"dist":{"shasum":"1c11f9218f076089a47dd512f93c6699a6a81d52","tarball":"http://nexus.dui88.com:8081/nexus/content/groups/npm-all/yallist/-/yallist-2.1.2.tgz"},"maintainers":[{"name":"isaacs","email":"i@izs.me"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/yallist-2.1.2.tgz_1489443365033_0.47744474792853"}},"3.0.2":{"name":"yallist","version":"3.0.2","description":"Yet Another Linked List","main":"yallist.js","directories":{"test":"test"},"files":["yallist.js","iterator.js"],"dependencies":{},"devDependencies":{"tap":"^10.3.0"},"scripts":{"test":"tap test/*.js --100","preversion":"npm test","postversion":"npm publish","postpublish":"git push origin --all; git push origin --tags"},"repository":{"type":"git","url":"git+https://github.com/isaacs/yallist.git"},"author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"http://blog.izs.me/"},"license":"ISC","gitHead":"d692d0f974934858b76c3b1f7f0973d0450c5c87","bugs":{"url":"https://github.com/isaacs/yallist/issues"},"homepage":"https://github.com/isaacs/yallist#readme","_id":"yallist@3.0.2","_shasum":"8452b4bb7e83c7c188d8041c1a837c773d6d8bb9","_from":".","_npmVersion":"4.5.0","_nodeVersion":"8.0.0-pre","_npmUser":{"name":"isaacs","email":"i@izs.me"},"dist":{"shasum":"8452b4bb7e83c7c188d8041c1a837c773d6d8bb9","tarball":"http://nexus.dui88.com:8081/nexus/content/groups/npm-all/yallist/-/yallist-3.0.2.tgz"},"maintainers":[{"name":"isaacs","email":"i@izs.me"}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/yallist-3.0.2.tgz_1493150377027_0.22160566318780184"}}},"name":"yallist","time":{"modified":"2017-05-29T17:43:14.339Z","created":"2015-12-18T08:02:25.789Z","1.0.0":"2015-12-18T08:02:25.789Z","1.0.1":"2015-12-18T09:29:58.326Z","1.0.2":"2015-12-18T23:20:23.258Z","1.1.0":"2015-12-19T00:32:18.820Z","2.0.0":"2015-12-19T19:55:29.661Z","2.0.1":"2017-03-11T20:09:18.123Z","2.1.0":"2017-03-13T02:03:46.998Z","2.1.1":"2017-03-13T16:55:34.896Z","3.0.0":"2017-03-13T16:56:52.633Z","3.0.1":"2017-03-13T22:12:34.074Z","2.1.2":"2017-03-13T22:16:05.251Z","3.0.2":"2017-04-25T19:59:38.913Z"},"readmeFilename":"README.md","homepage":"https://github.com/isaacs/yallist#readme"}