{"_id":"dequeue","_rev":"24-d649588f77aeb2611c5e644b58039939","name":"dequeue","description":"A simple double ended queue datastructure","dist-tags":{"latest":"1.0.5"},"versions":{"1.0.0":{"name":"dequeue","main":"./lib/index.js","version":"1.0.0","description":"A simple double ended queue datastructure","keywords":["datastructure","queue","double ended queue","fifo","FIFO","linked list"],"homepage":"https://github.com/lleo/node-dequeue","repository":{"type":"git","url":"git://github.com/lleo/node-dequeue.git"},"bugs":{"email":"lleoem@gmail.com","url":"https://github.com/lleo/node-dequeue/issues"},"author":{"name":"LLeo","email":"lleoem@gmail.com","url":"http://lleo-blog.blogspot.com/"},"engines":{"node":"*"},"dependencies":{},"_npmUser":{"name":"lleo","email":"lleoem@gmail.com"},"_id":"dequeue@1.0.0","devDependencies":{},"optionalDependencies":{},"_engineSupported":true,"_npmVersion":"1.1.13","_nodeVersion":"v0.8.1","_defaultsLoaded":true,"dist":{"shasum":"58813e3ea0d40da95764a1ef364e456c373d9abe","tarball":"https://registry.npmjs.org/dequeue/-/dequeue-1.0.0.tgz","integrity":"sha512-VnYGWPcLwnIdBzH0xDLDmJNRXXdwFkJIt3DlZ6wwnMQ87/Q+6gfnJLP+M1K/t1tiwDSrXyo9cvAypAxN3MLkwA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBmbF4EdICYGV4Gqezm28POAeFhWGk3+EnZ0X/HGJH1oAiBb/S0bp3CDqnv7eEus9YGLei/kpHSARpgSxK41uD7Z2g=="}]},"maintainers":[{"name":"lleo","email":"lleoem@gmail.com"}],"directories":{}},"1.0.1":{"name":"dequeue","main":"./lib/index.js","version":"1.0.1","description":"A simple double ended queue datastructure","keywords":["datastructure","queue","double ended queue","fifo","FIFO","linked list"],"homepage":"https://github.com/lleo/node-dequeue","repository":{"type":"git","url":"git://github.com/lleo/node-dequeue.git"},"bugs":{"email":"lleoem@gmail.com","url":"https://github.com/lleo/node-dequeue/issues"},"author":{"name":"LLeo","email":"lleoem@gmail.com","url":"http://lleo-blog.blogspot.com/"},"engines":{"node":"*"},"dependencies":{},"_npmUser":{"name":"lleo","email":"lleoem@gmail.com"},"_id":"dequeue@1.0.1","devDependencies":{},"optionalDependencies":{},"_engineSupported":true,"_npmVersion":"1.1.13","_nodeVersion":"v0.8.1","_defaultsLoaded":true,"dist":{"shasum":"cfa1545d1d98edcf28dd7bab793c206b08a8c979","tarball":"https://registry.npmjs.org/dequeue/-/dequeue-1.0.1.tgz","integrity":"sha512-l00g/4+c1+jMGL7zJGxnj6We+7+qTkSkQkcIbMao9y7CDOPNJp3uiVECDwuhQwuGvORuGAtz0ymfbNt75rKznQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFz4jLfKfBenZlRWaCSnQKv9nqfblJxvuF6Sy9f8xbk3AiBXKc5YEupDo7WOB2H0rM9mNFkDxSV3QoC754hI4XnACQ=="}]},"maintainers":[{"name":"lleo","email":"lleoem@gmail.com"}],"directories":{}},"1.0.2":{"name":"dequeue","main":"./lib/index.js","version":"1.0.2","description":"A simple double ended queue datastructure","keywords":["datastructure","queue","double ended queue","fifo","FIFO","linked list"],"homepage":"https://github.com/lleo/node-dequeue","repository":{"type":"git","url":"git://github.com/lleo/node-dequeue.git"},"bugs":{"email":"lleoem@gmail.com","url":"https://github.com/lleo/node-dequeue/issues"},"author":{"name":"LLeo","email":"lleoem@gmail.com","url":"http://lleo-blog.blogspot.com/"},"engines":{"node":"*"},"dependencies":{},"_npmUser":{"name":"lleo","email":"lleoem@gmail.com"},"_id":"dequeue@1.0.2","devDependencies":{},"optionalDependencies":{},"_engineSupported":true,"_npmVersion":"1.1.13","_nodeVersion":"v0.8.1","_defaultsLoaded":true,"dist":{"shasum":"0aed0396762de573e331e8f1c6663a3729b1ab05","tarball":"https://registry.npmjs.org/dequeue/-/dequeue-1.0.2.tgz","integrity":"sha512-lmsXvro6UYhbmkf+74+5yZq0fiFmhsy4zHYaP/xIu0nhit7n49TQHk3xSdfS7oELkSUonbrHRvH74v2OGg4NAw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDhlwbA/otN8QHnXjKJQximZgPiD3OIhVH4VK0JR9cvXAiEA6HRMG9bh/39NvwKGb6FLU2vrdhedh5ScASh26lpv7PE="}]},"maintainers":[{"name":"lleo","email":"lleoem@gmail.com"}],"directories":{}},"1.0.3":{"name":"dequeue","main":"./lib/index.js","version":"1.0.3","description":"A simple double ended queue datastructure","keywords":["datastructure","queue","double ended queue","fifo","FIFO","linked list"],"homepage":"https://github.com/lleo/node-dequeue","repository":{"type":"git","url":"git://github.com/lleo/node-dequeue.git"},"bugs":{"email":"lleoem@gmail.com","url":"https://github.com/lleo/node-dequeue/issues"},"author":{"name":"LLeo","email":"lleoem@gmail.com","url":"http://lleo-blog.blogspot.com/"},"engines":{"node":"*"},"dependencies":{},"_npmUser":{"name":"lleo","email":"lleoem@gmail.com"},"_id":"dequeue@1.0.3","devDependencies":{},"optionalDependencies":{},"_engineSupported":true,"_npmVersion":"1.1.13","_nodeVersion":"v0.8.1","_defaultsLoaded":true,"dist":{"shasum":"30b8f4da2fc240951a15d31b35283e29b2de8978","tarball":"https://registry.npmjs.org/dequeue/-/dequeue-1.0.3.tgz","integrity":"sha512-SrsGhEsuxPk/2zIjwsv4jzErlGzDtZludN2pbW/KqbUs6Xwuub8wWQbB6iH+ACgnUrxYcM0ew9N0uUD+wpneDw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIF2PrcB1Y3mXv/7KQDJRnhAQ8KblhldnqV07aQUuHWw+AiEApJJJJGck7fWEeS9A3M43ggZb+Zm0d9O0HZV1EWv7L0Q="}]},"maintainers":[{"name":"lleo","email":"lleoem@gmail.com"}]},"1.0.4":{"name":"dequeue","main":"./lib/index.js","version":"1.0.4","description":"A simple double ended queue datastructure","keywords":["datastructure","queue","double ended queue","fifo","FIFO","linked list"],"homepage":"https://github.com/lleo/node-dequeue","repository":{"type":"git","url":"https://github.com/lleo/node-dequeue"},"bugs":{"url":"https://github.com/lleo/node-dequeue/issues","email":"lleoem@gmail.com"},"author":{"name":"LLeo","email":"lleoem@gmail.com","url":"http://lleo-blog.blogspot.com/"},"engines":{"node":"*"},"dependencies":{},"readme":"A Simple Double Ended Queue Datastructure\n=========================================\n\nDequeue is implemented as a doubly linked circular list with a titular head\nnode. By \"titular head node\", I mean an empty node to designate the beginning\nand end of the circularly linked list. I first saw this construction in the\nlinux kernel source and it seem simple and elegant. I added the `.length`\nproperty to use it like I was using an Array.\n\nI was using a javascript Array as a FIFO. Somewhere between 100,000 and\n200,000 entries the program performance went to hell (dev host is a MBP\nw/8GB RAM). 15 minutes later, I implemented a simple dequeue and my FIFO\nscales up to millions of entries.\n\nIt is a drop-in replacement for javascript-arrays-as-fifo.\n\n## Example: Dequeue as a replacement for an Array as a FIFO\n\n    var Dequeue = require('dequeue')\n    \n    //var fifo = []\n    var fifo = new Dequeue()\n    \n    fifo.length === 0 //=> true\n    \n    fifo.push(d1)\n    fifo.length === 1 //=> true\n    \n    fifo.unshift(d2)\n    \n    fifo.pop() === d1 //=> true\n    \n    fifo.push(d3)\n    \n    fifo.shift() === d2 //=> true\n    \n    fifo.length === 1 //=> true; only d3 is in the dequeue\n    \n## API\n\n### `deque = new Dequeue()`\n\n### `deque.push(value)`\nPush a value on the end.\n\n### `value = deque.pop()`\nRemove a value off the end.\n\n### `deque.unshift(value)`\nPush a value on the beginning.\n\n### `value = deque.shift()`\nRemove a value off the beginning.\n\n### `deque.empty()`\nRemove all entries. This is NOT a test for an empty dequeue; use `deque.length`\nfor that.\n\n## Future Development\nSomething this simple does not really need a roadmap. However, I am thinking\nof adding APIs to facilitate walking the Linked List via an iterator. It will\nbe simple and fully backward compatible.\n\n## About the Code\n\nI was convinced by [a blog posting](http://blog.izs.me/post/2353458699/an-open-letter-to-javascript-leaders-regarding) [by Issac Z. Schlueter](http://blog.izs.me/) that I don't need\nsemicolons. So I don't use them.\n","readmeFilename":"README.md","_id":"dequeue@1.0.4","dist":{"shasum":"64ee18f20cf2dae739577faa99f9abaa451b0ed0","tarball":"https://registry.npmjs.org/dequeue/-/dequeue-1.0.4.tgz","integrity":"sha512-WOsU8AfqJm0wIQQpLLp6IkqW/XS4bvt1rGhYCK1hBaJWYqtJ2QFX0zV8VULc1scV8DP4+Od/slzVLT5CmgR6rg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDCfitHBTfmjpAC5ERqbtuZUhcnFzx6ES/b0hsyEHQUeAiEAkkvegAfQF+O+MCPNCgYUTLDbMQs39/FAGc2VN5Y0MSI="}]},"_from":".","_npmVersion":"1.2.15","_npmUser":{"name":"lleo","email":"lleoem@gmail.com"},"maintainers":[{"name":"lleo","email":"lleoem@gmail.com"}]},"1.0.5":{"name":"dequeue","main":"./lib/index.js","version":"1.0.5","description":"A simple double ended queue datastructure","keywords":["datastructure","queue","double ended queue","fifo","FIFO","linked list"],"homepage":"https://github.com/lleo/node-dequeue","repository":{"type":"git","url":"https://github.com/lleo/node-dequeue"},"bugs":{"url":"https://github.com/lleo/node-dequeue/issues","email":"lleoem@gmail.com"},"author":{"name":"LLeo","email":"lleoem@gmail.com","url":"http://lleo-blog.blogspot.com/"},"engines":{"node":"*"},"dependencies":{},"readme":"A Simple Double Ended Queue Datastructure\n=========================================\n\nDequeue is implemented as a doubly linked circular list with a titular head\nnode. By \"titular head node\", I mean an empty node to designate the beginning\nand end of the circularly linked list. I first saw this construction in the\nlinux kernel source and it seem simple and elegant. I added the `.length`\nproperty to use it like I was using an Array.\n\nI was using a javascript Array as a FIFO. Somewhere between 100,000 and\n200,000 entries the program performance went to hell (dev host is a MBP\nw/8GB RAM). 15 minutes later, I implemented a simple dequeue and my FIFO\nscales up to millions of entries.\n\nIt is a drop-in replacement for javascript-arrays-as-fifo.\n\n## Example: Dequeue as a replacement for an Array as a FIFO\n\n    var Dequeue = require('dequeue')\n    \n    //var fifo = []\n    var fifo = new Dequeue()\n    \n    fifo.length === 0 //=> true\n    \n    fifo.push(d1)\n    fifo.length === 1 //=> true\n    \n    fifo.unshift(d2)\n    \n    fifo.pop() === d1 //=> true\n    \n    fifo.push(d3)\n    \n    fifo.shift() === d2 //=> true\n    \n    fifo.length === 1 //=> true; only d3 is in the dequeue\n    \n## API\n\n### `deque = new Dequeue()`\n\n### `deque.push(value)`\nPush a value on the end.\n\n### `value = deque.pop()`\nRemove a value off the end.\n\n### `deque.unshift(value)`\nPush a value on the beginning.\n\n### `value = deque.shift()`\nRemove a value off the beginning.\n\n### `value = deque.last()`\nExamine the value of the end without removing it.\n\n### `value = deque.first()`\nExamine the value of the beginning without removing it.\n\n### `deque.empty()`\nRemove all entries. This is NOT a test for an empty dequeue; use `deque.length`\nfor that.\n\n## Future Development\nSomething this simple does not really need a roadmap. However, I am thinking\nof adding APIs to facilitate walking the Linked List via an iterator. It will\nbe simple and fully backward compatible.\n\n## About the Code\n\nI was convinced by [a blog posting](http://blog.izs.me/post/2353458699/an-open-letter-to-javascript-leaders-regarding) [by Issac Z. Schlueter](http://blog.izs.me/) that I don't need\nsemicolons. So I don't use them.\n","readmeFilename":"README.md","_id":"dequeue@1.0.5","dist":{"shasum":"10f1cef07e3234b21dcb38f4bfa2d66034ab67c7","tarball":"https://registry.npmjs.org/dequeue/-/dequeue-1.0.5.tgz","integrity":"sha512-2FIVJZTaWhUj0Y2uKmDAasTP6ZwFWRjkRc01MYN5jFm96iIzkYyNzGADfJ13C5W7CTN7XO9mBYDcVB68eNybBA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFgjVwxXvfjx/4+8IB1Xx+DilGwpZ4nALExmcF1o5zqZAiEA7r7n7VY0MlELYt7HPOaGw1dMnlbrKRSTPyxpCPcIF90="}]},"_from":".","_npmVersion":"1.3.5","_npmUser":{"name":"lleo","email":"lleoem@gmail.com"},"maintainers":[{"name":"lleo","email":"lleoem@gmail.com"}]}},"readme":"A Simple Double Ended Queue Datastructure\n=========================================\n\nI was using a javascript array as a FIFO. Somewhere between 100,000 and\n200,000 entries the program performance went to hell (dev host is a MBP\nw/8GB RAM). 15 minutes later, I implemented a simple dequeue and my FIFO\nscales up to millions of entries.\n\nIt is a dropin replacement for javascript-arrays-as-fifo.\n\nBTW, I use [Felix's Node.js Style Guide](http://nodeguide.com/style.html);\nget over it ;)\n\n## So here is the API:\n\n    var Dequeue = require('dequeue')\n    \n    //var fifo = []\n    var fifo = new Dequeue()\n    \n    fifo.length === 0 //=> true\n    \n    fifo.push(d1)\n    fifo.length === 1 //=> true\n    \n    fifo.unshift(d2)\n    \n    fifo.pop() === d1 //=> true\n    \n    fifo.push(d3)\n    \n    fifo.shift() === d2 //=> true\n    \n    fifo.length === 1 //=> true; only d3 is in the dequeue\n","maintainers":[{"name":"lleo","email":"lleoem@gmail.com"}],"time":{"modified":"2022-06-15T01:17:27.154Z","created":"2012-07-06T22:38:36.186Z","1.0.0":"2012-07-06T22:38:36.766Z","1.0.1":"2012-07-07T12:25:07.569Z","1.0.2":"2012-07-08T01:23:13.342Z","1.0.3":"2012-07-08T02:41:03.238Z","1.0.4":"2013-03-22T15:28:53.795Z","1.0.5":"2013-08-29T15:45:51.180Z"},"author":{"name":"LLeo","email":"lleoem@gmail.com","url":"http://lleo-blog.blogspot.com/"},"repository":{"type":"git","url":"https://github.com/lleo/node-dequeue"},"users":{"lleo":true}}