{"name":"yallist","version":"3.1.0","description":"Yet Another Linked List","main":"yallist.js","directories":{"test":"test"},"dependencies":{},"devDependencies":{"tap":"^12.1.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":"ec6f8c1551f730a593bd658413e68ba779976602","bugs":{"url":"https://github.com/isaacs/yallist/issues"},"homepage":"https://github.com/isaacs/yallist#readme","_id":"yallist@3.1.0","_nodeVersion":"12.8.1","_npmVersion":"6.11.3","dist":{"integrity":"sha512-6gpP93MR+VOOehKbCPchro3wFZNSNmek8A2kbkOAZLIZAYx1KP/zAqwO0sOHi3xJEb+UBz8NaYt/17UNit1Q9w==","shasum":"906cc2100972dc2625ae78f566a2577230a1d6f7","tarball":"http://registry-npm.ywwl.com/yallist/download/yallist-3.1.0.tgz","fileCount":5,"unpackedSize":14752,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdjPHZCRA9TVsSAnZWagAAuDEP/1O6n2B3Kc7y61cvdPyD\n4VMIJMEXwhGEBX4tGY1dMDlpgzzB36WYeGNrTLwDFAG3ylB4GnUuBqzULcBw\nSqPFwWaBIQr42no90xufaH8eYOaFa7CGZocQr/5DLNkWPCRJFbz5bxGzQw8A\nWE2/5JrWKFRmAP+0T4zHLix109VGcAtsVZR4hYlyZI57uQTrmH4MMXapRdeM\n3THrHhUaCb9muAFET1wPpJ2ElBYVj9yxJhLWArjtX70/+4RFCNhtT3sIQvcB\nm6l+ntmxYGEL5ctRMuO0Zp6HJmNFe9LUDzORb+yIcYMBElHTw9x8dm1Mf7bA\nwy4S/ltoYb1JQc7R/WdRzAQ/7ydQxPi58+qitwg3dRVC2g7QLRlQ/qnGo3ua\nhbhp18s4pyc3fCpVfBcrm9wRprF6+3a+jkxoCCD520+Dk39wikPywe5erXeh\nXXtmjJuelQ5NTncwPoKgSwUEUTxxu5SM4U8ZCrmLm11NeoSuFZAlGhzZ2RY7\n7Hbuxgeebem1iXINKs+2wKqz8lDqynl6B73dr+RKvo1a7n//wnryv7RdQt7I\nUnXuai2w1nyF0ujnB5eY1hWHOI98S5Wfhd4ixSO+NJXfDmSSkYEy8nt8zZ1q\nWRPb+OCU764+aaIMnou3+HeFgFabfOxQQZjyV5IOklaJr4P9Qc3ScLeW2ejF\n/s0O\r\n=uzdV\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEPx4WzSbryVu0CMhLYbdkmKSsfap8EuN96AhwLjBs7QAiEArhd19awNw5mqGUcFtiUK9C9T8WuLZv6BcQJR5GtTn1E="}],"size":4492,"noattachment":false,"key":"/yallist/-/yallist-3.1.0.tgz"},"maintainers":[{"name":"isaacs","email":"i@izs.me"}],"_npmUser":{"name":"isaacs","email":"i@izs.me"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/yallist_3.1.0_1569518041046_0.5437509782914414"},"_hasShrinkwrap":false,"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## basic usage\n\n```js\nimport { Yallist } from 'yallist'\nvar myList = new Yallist([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.splice(start, deleteCount, ...)\n\nLike Array.splice.\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 `const 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","publish_time":1569518041323,"_cnpm_publish_time":1569518041323,"dist-tags":{"latest":"5.0.0"}}