{"name":"tiny-queue","version":"0.2.0","description":"Simple FIFO queue implementation to avoid having to do shift() on an array, which is slow.","main":"index.js","scripts":{"test":"tape test.js"},"repository":{"type":"git","url":"https://github.com/nolanlawson/tiny-queue.git"},"keywords":["queue","fifo"],"author":{"name":"Nolan Lawson","email":"nolan.lawson@gmail.com"},"license":"Apache 2","bugs":{"url":"https://github.com/nolanlawson/tiny-queue/issues"},"homepage":"https://github.com/nolanlawson/tiny-queue","devDependencies":{"tape":"^2.13.1"},"testling":{"files":["test.js"],"browsers":["iexplore/8..latest","chrome/22..latest","chrome/canary","firefox/24..latest","firefox/nightly","opera/15..latest","opera/next","safari/5.0.5..latest","iphone/latest","ipad/latest","android-browser/latest"]},"_id":"tiny-queue@0.2.0","_shasum":"c49fcb5c87555be1b4a5df7eb87101d5b78bc9dc","_from":".","_npmVersion":"1.4.10","_npmUser":{"name":"nolanlawson","email":"nolan@nolanlawson.com"},"maintainers":[{"name":"nolanlawson","email":"nolan@nolanlawson.com"}],"dist":{"shasum":"c49fcb5c87555be1b4a5df7eb87101d5b78bc9dc","tarball":"http://registry-npm.ywwl.com/tiny-queue/download/tiny-queue-0.2.0.tgz","integrity":"sha512-ucfrvjzfbtc+xqmn95DEUtGcDHJHQgZ9IR0mizPOZBkY45reZDCJjafUGVJOGJassjn0MavTyWOCQcG+agpLxw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCDacy2vwfzrpj5KLuKFaODD4O135/fFNZQWXDoG4Hw7QIgNh2VUiRDgPzQsO5TCVlBnXoClaaV79smpvyO6GvJ1Mk="}],"size":8755,"noattachment":false,"key":"/tiny-queue/-/tiny-queue-0.2.0.tgz"},"directories":{},"readme":"tiny-queue\n============\n\nA simple FIFO queue implementation to avoid having to do `shift()`\non an array, which is slow. It's implemented in the straightforward `root -> node1 -> node2 -> etc.`\narchitecture that we all remember from CS 101.\n\nThis can typically be used as a drop-in replacement for an array, and it's only 38 lines of code.\n\n### Status\n\n[![browser support](https://ci.testling.com/nolanlawson/tiny-queue.png)](https://ci.testling.com/nolanlawson/tiny-queue)\n\n### Usage\n\n```\nnpm install tiny-queue\n```\n\nThen:\n\n```js\nvar Queue = require('tiny-queue');\nvar queue = new Queue();\n\nqueue.push('foo');\nqueue.push('bar');\nqueue.shift(); // 'foo'\nqueue.shift(); //'bar'\nqueue.length; // 0\nqueue.shift(); // undefined\n```\n\n### API\n\nThe returned `Queue` object, once instantiated, only supports\nfour operations:\n\n```js\nqueue.push()\nqueue.shift()\nqueue.slice() // returns a regular Array\nqueue.length\n```\n\nSo it's basically a drop-in replacement for most na&iuml;ve usages\nof an array as a queue.\n","publish_time":1400814234426,"_cnpm_publish_time":1400814234426,"dist-tags":{"latest":"0.2.1"}}