package.json 7.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. {
  2. "_args": [
  3. [
  4. {
  5. "raw": "yallist@^2.1.2",
  6. "scope": null,
  7. "escapedName": "yallist",
  8. "name": "yallist",
  9. "rawSpec": "^2.1.2",
  10. "spec": ">=2.1.2 <3.0.0",
  11. "type": "range"
  12. },
  13. "/mnt/Data/bach/Documents/ola/OLA#4/OLA#4DOC/sys/node_modules/cross-spawn/node_modules/lru-cache"
  14. ]
  15. ],
  16. "_from": "yallist@>=2.1.2 <3.0.0",
  17. "_id": "yallist@2.1.2",
  18. "_inCache": true,
  19. "_location": "/yallist",
  20. "_nodeVersion": "8.0.0-pre",
  21. "_npmOperationalInternal": {
  22. "host": "packages-12-west.internal.npmjs.com",
  23. "tmp": "tmp/yallist-2.1.2.tgz_1489443365033_0.47744474792853"
  24. },
  25. "_npmUser": {
  26. "name": "isaacs",
  27. "email": "i@izs.me"
  28. },
  29. "_npmVersion": "4.3.0",
  30. "_phantomChildren": {},
  31. "_requested": {
  32. "raw": "yallist@^2.1.2",
  33. "scope": null,
  34. "escapedName": "yallist",
  35. "name": "yallist",
  36. "rawSpec": "^2.1.2",
  37. "spec": ">=2.1.2 <3.0.0",
  38. "type": "range"
  39. },
  40. "_requiredBy": [
  41. "/cross-spawn/lru-cache"
  42. ],
  43. "_resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz",
  44. "_shasum": "1c11f9218f076089a47dd512f93c6699a6a81d52",
  45. "_shrinkwrap": null,
  46. "_spec": "yallist@^2.1.2",
  47. "_where": "/mnt/Data/bach/Documents/ola/OLA#4/OLA#4DOC/sys/node_modules/cross-spawn/node_modules/lru-cache",
  48. "author": {
  49. "name": "Isaac Z. Schlueter",
  50. "email": "i@izs.me",
  51. "url": "http://blog.izs.me/"
  52. },
  53. "bugs": {
  54. "url": "https://github.com/isaacs/yallist/issues"
  55. },
  56. "dependencies": {},
  57. "description": "Yet Another Linked List",
  58. "devDependencies": {
  59. "tap": "^10.3.0"
  60. },
  61. "directories": {
  62. "test": "test"
  63. },
  64. "dist": {
  65. "shasum": "1c11f9218f076089a47dd512f93c6699a6a81d52",
  66. "tarball": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz"
  67. },
  68. "files": [
  69. "yallist.js",
  70. "iterator.js"
  71. ],
  72. "gitHead": "566cd4cd1e2ce57ffa84e295981cd9aa72319391",
  73. "homepage": "https://github.com/isaacs/yallist#readme",
  74. "license": "ISC",
  75. "main": "yallist.js",
  76. "maintainers": [
  77. {
  78. "name": "isaacs",
  79. "email": "i@izs.me"
  80. }
  81. ],
  82. "name": "yallist",
  83. "optionalDependencies": {},
  84. "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",
  85. "readmeFilename": "README.md",
  86. "repository": {
  87. "type": "git",
  88. "url": "git+https://github.com/isaacs/yallist.git"
  89. },
  90. "scripts": {
  91. "postpublish": "git push origin --all; git push origin --tags",
  92. "postversion": "npm publish",
  93. "preversion": "npm test",
  94. "test": "tap test/*.js --100"
  95. },
  96. "version": "2.1.2"
  97. }