{"_id":"fast-list","_rev":"13-17c6d41b8f5d9f1e04208acb5f661c4a","name":"fast-list","description":"A fast linked list (good for queues, stacks, etc.)","dist-tags":{"latest":"1.0.3"},"versions":{"1.0.0":{"author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"http://blog.izs.me/"},"name":"fast-list","description":"A fast linked list (good for queues, stacks, etc.)","version":"1.0.0","repository":{"type":"git","url":"git://github.com/isaacs/fast-list.git"},"main":"fast-list.js","engines":{"node":"*"},"dependencies":{},"devDependencies":{"bench":"~0.3.2","tap":"~0.1.0"},"scripts":{"test":"node test.js","bench":"node bench.js"},"_npmUser":{"name":"isaacs","email":"i@izs.me"},"_id":"fast-list@1.0.0","_engineSupported":true,"_npmVersion":"1.1.0-alpha","_nodeVersion":"v0.6.2-pre","_defaultsLoaded":true,"dist":{"shasum":"df82a1536280469e185a7592fd72cbbbff32189b","tarball":"https://registry.npmjs.org/fast-list/-/fast-list-1.0.0.tgz","integrity":"sha512-t9nRp9qO/4FVBFwwIyb5SLTo1kXCcNOv0Dzl58q2CGy2czu9H+3twEuuL220irg6PX+aaVFZXsqpFYBknG3omA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEeqTrktyJaHGj7fmAJoC2vfHAWzvEXC2sckZ1HLRE/bAiEA+yAGPybNYjATdgPbGdzDH8rwMCJfZOqdOO7a9Ux8gNk="}]},"maintainers":[{"name":"isaacs","email":"i@izs.me"}]},"1.0.1":{"author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"http://blog.izs.me/"},"name":"fast-list","description":"A fast linked list (good for queues, stacks, etc.)","version":"1.0.1","repository":{"type":"git","url":"git://github.com/isaacs/fast-list.git"},"main":"fast-list.js","dependencies":{},"devDependencies":{"bench":"~0.3.2","tap":"~0.1.0"},"scripts":{"test":"node test.js","bench":"node bench.js"},"_npmUser":{"name":"isaacs","email":"i@izs.me"},"_id":"fast-list@1.0.1","engines":{"node":"*"},"_engineSupported":true,"_npmVersion":"1.1.0-alpha-2","_nodeVersion":"v0.6.2-pre","_defaultsLoaded":true,"dist":{"shasum":"24cc58fbe2900d1985fe38a6f7e9c9fb9cb8d309","tarball":"https://registry.npmjs.org/fast-list/-/fast-list-1.0.1.tgz","integrity":"sha512-uT4PTOomTFjAu1n6WFM1gZaUmrchWOvRgqUKMtp5gjxqsu+OHbdsiwaP6Zw4EIqzeRN1qdjZLQ0t1kl8UssEKA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICqnqdfRFu38eO8FPUjeNtPzjcxRM8kpR3KFUHkPwsdHAiEAmJOb4UdfzasIX3HNST/8TinWMXF/uwx8NWcn507EWK4="}]},"maintainers":[{"name":"isaacs","email":"i@izs.me"}]},"1.0.2":{"author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"http://blog.izs.me/"},"name":"fast-list","description":"A fast linked list (good for queues, stacks, etc.)","version":"1.0.2","repository":{"type":"git","url":"git://github.com/isaacs/fast-list.git"},"main":"fast-list.js","dependencies":{},"devDependencies":{"bench":"~0.3.2","tap":"~0.1.0"},"scripts":{"test":"tap test.js","bench":"node bench.js"},"_npmUser":{"name":"isaacs","email":"i@izs.me"},"_id":"fast-list@1.0.2","engines":{"node":"*"},"_engineSupported":true,"_npmVersion":"1.1.0-beta-8","_nodeVersion":"v0.6.7-pre","_defaultsLoaded":true,"dist":{"shasum":"37caa0dc23692a6251212040b521fd0ea08c327b","tarball":"https://registry.npmjs.org/fast-list/-/fast-list-1.0.2.tgz","integrity":"sha512-pATOw4Bx/xL3LUISw9ANnD/+15Gpky/EaeNbTSzBM2fIxu9E34dtg/SmR5UKLG1YKltn0JkZm6O3URknAD+2oQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCJpK8u9kklAbE7ywne1fNRFWV38G8zYfPCMxfGsiuHRAIhAKKYCMi/wtUOWClfHEuYZF3ZT7u0TuJaAgi4wcYB4VhN"}]},"maintainers":[{"name":"isaacs","email":"i@izs.me"}]},"1.0.3":{"author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"http://blog.izs.me/"},"name":"fast-list","description":"A fast linked list (good for queues, stacks, etc.)","version":"1.0.3","repository":{"type":"git","url":"git://github.com/isaacs/fast-list.git"},"main":"fast-list.js","dependencies":{},"devDependencies":{"bench":"~0.3.2","tap":"^1.2.0"},"scripts":{"test":"tap test.js","bench":"node bench.js"},"license":"ISC","gitHead":"db31c693ce99a29ee989fc8b5a8322884765e07d","bugs":{"url":"https://github.com/isaacs/fast-list/issues"},"homepage":"https://github.com/isaacs/fast-list#readme","_id":"fast-list@1.0.3","_shasum":"f5d5754a7c1cbf682a15961ef9a063897571eaa1","_from":".","_npmVersion":"2.10.1","_nodeVersion":"2.0.1","_npmUser":{"name":"isaacs","email":"isaacs@npmjs.com"},"dist":{"shasum":"f5d5754a7c1cbf682a15961ef9a063897571eaa1","tarball":"https://registry.npmjs.org/fast-list/-/fast-list-1.0.3.tgz","integrity":"sha512-Lm56Ci3EqefHNdIneRFuzhpPcpVVBz9fgqVmG3UQIxAefJv1mEYsZ1WQLTWqmdqeGEwbI2t6fbZgp9TqTYARuA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC42noanS+EQmg37x5KSU/cSCbbf4eL3Z3rPxA2Vd99EQIhAPGmXjdOvAlVJ6DV+BDF98NyrjS5RCMmMnKGd70N8N2S"}]},"maintainers":[{"name":"isaacs","email":"i@izs.me"}]}},"readme":"# The Problem\n\nYou've got some thing where you need to push a bunch of stuff into a\nqueue and then shift it out.  Or, maybe, you need to pop it out\nstack-like, but it's not clear at the outset which way it's going to go.\n\nArrays work for this, but are a bit costly performance-wise in the mixed\ncase.  In the pure-stack case (or, as of recent V8 versions, the pure-queue\ncase as well), Arrays are best.\n\nIn cases where it's mixed, a linked list implementation can be\nsignificantly faster.  See the benchmark scripts in `bench/*.js` to\nmeasure the differences.\n\nThis lacks a lot of features that arrays have:\n\n1. You can't specify the size at the outset.\n2. It's not indexable.\n3. There's no join, concat, etc.\n\nIf any of this matters for your use case, you're probably better off\nusing an Array object.\n\nIf you *know* that you'll be using it as a stack or a queue exclusively,\nthen you're better off using an Array object.\n\nIf you know the eventual size at the offset, then you're definitely\nbetter off using an Array.\n\n## Installing\n\n```\nnpm install fast-list\n```\n\n## API\n\n```javascript\nvar FastList = require(\"fast-list\")\nvar list = new FastList()\nlist.push(\"foo\")\nlist.unshift(\"bar\")\nlist.push(\"baz\")\nconsole.log(list.length) // 2\nconsole.log(list.pop()) // baz\nconsole.log(list.shift()) // bar\nconsole.log(list.shift()) // foo\n```\n\n### Methods\n\n* `push`: Just like Array.push, but only can take a single entry\n* `pop`: Just like Array.pop.  Note: if you're only using push and pop,\n  then you have a stack, and Arrays are better for that.\n* `shift`: Just like Array.shift.  Note: if you're only using push and\n  shift, then you have a queue, and Arrays are better for that.\n* `unshift`: Just like Array.unshift, but only can take a single entry.\n* `drop`: Drop all entries\n* `item(n)`: Retrieve the nth item in the list.  This involves a walk\n  every time.  It's very slow.  If you find yourself using this,\n  consider using a normal Array instead.\n* `map(fn, thisp)`: Like `Array.prototype.map`.  Returns a new FastList.\n* `reduce(fn, startValue, thisp)`: Like `Array.prototype.reduce`\n* `forEach(fn, this)`: Like `Array.prototype.forEach`\n* `filter(fn, thisp)`: Like `Array.prototype.filter`. Returns a new\n  FastList.\n* `slice(start, end)`: Retrieve an array of the items at this position.\n  This involves a walk every time.  It's very slow.  If you find\n  yourself using this, consider using a normal Array instead.\n\n### Members\n\n* `length`: The number of things in the list.  Note that, unlike\n  Array.length, this is not a getter/setter, but rather a counter that\n  is internally managed.  Setting it can only cause harm.\n","maintainers":[{"name":"isaacs","email":"i@izs.me"}],"time":{"modified":"2022-06-17T23:36:32.277Z","created":"2011-11-22T02:34:22.617Z","1.0.0":"2011-11-22T02:34:23.810Z","1.0.1":"2011-11-23T00:45:44.767Z","1.0.2":"2012-01-04T20:44:43.032Z","1.0.3":"2015-06-01T04:10:56.038Z"},"author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"http://blog.izs.me/"},"repository":{"type":"git","url":"git://github.com/isaacs/fast-list.git"},"users":{"roboterhund87":true},"homepage":"https://github.com/isaacs/fast-list#readme","bugs":{"url":"https://github.com/isaacs/fast-list/issues"},"license":"ISC","readmeFilename":"README.md"}