{"_id":"ttq","_rev":"5-371e85e294edb6951be5ba94594a0c23","name":"ttq","description":"A queue that tests its contents on an interval.","dist-tags":{"latest":"0.1.2"},"versions":{"0.1.1":{"name":"ttq","version":"0.1.1","description":"A queue that tests its contents on an interval.","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"https://github.com/mmaelzer/ttq"},"keywords":["queue","timed","test"],"author":{"name":"Mike Maelzer","email":"mmaelzer@gmail.com"},"license":"BSD","bugs":{"url":"https://github.com/mmaelzer/ttq/issues"},"homepage":"https://github.com/mmaelzer/ttq","_id":"ttq@0.1.1","dist":{"shasum":"2a889c3a486e82eb54b1b45f0a427f2375776129","tarball":"https://registry.npmjs.org/ttq/-/ttq-0.1.1.tgz","integrity":"sha512-iRg3TeuY3jO259TisP93ynasGGV7T/u097FlI7t4jarBkcHQ/PgLwgjfKyKKyNzmgBitoequoEkXyaoaDu2d6g==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEWfmuUDDHXhl/ZCRpGVyQI75Gpq2tpgCHOvHY22rHQoAiEA3CTgy/o2kt5onvtbA+mMMe9jj1wL+WSm0QGWmTLlyKI="}]},"_from":".","_npmVersion":"1.3.21","_npmUser":{"name":"mmaelzer","email":"mmaelzer@gmail.com"},"maintainers":[{"name":"mmaelzer","email":"mmaelzer@gmail.com"}]},"0.1.2":{"name":"ttq","version":"0.1.2","description":"A queue that tests its contents on an interval.","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"https://github.com/mmaelzer/ttq"},"keywords":["queue","timed","test"],"author":{"name":"Mike Maelzer","email":"mmaelzer@gmail.com"},"license":"MIT","bugs":{"url":"https://github.com/mmaelzer/ttq/issues"},"homepage":"https://github.com/mmaelzer/ttq","_id":"ttq@0.1.2","dist":{"shasum":"794ab9898e81bbb6102577905bec071b2ed364d9","tarball":"https://registry.npmjs.org/ttq/-/ttq-0.1.2.tgz","integrity":"sha512-UJh8Zx+3f/J/8dsX9/PeAppqH03R/Xx6MKeSDMACZ77LDTdv31MlM8zk/5GC/vDw0W/4e/EbeqgXSXnNPtoWqQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDEvtKreceJ7zhw0yRPonJB+1Ri4zkj1/QJc/3xrHKMPQIgQdtvGLjYdT2TjwmieZzs1HqYrup30uLnqoFzlk2aeVs="}]},"_from":".","_npmVersion":"1.3.21","_npmUser":{"name":"mmaelzer","email":"mmaelzer@gmail.com"},"maintainers":[{"name":"mmaelzer","email":"mmaelzer@gmail.com"}]}},"readme":"ttq\n=======\n\nA node.js queue that tests its contents on an interval and calls either a `success` or `fail` function with the current contents of the queue.\n  \nInstall\n--------\n```\nnpm install ttq\n```\n\nOptions\n--------\n* `asyncTest`: Boolean : Whether the test should pass/listen for a callback\n* `test`: Function(Array) : The function that gets passed all queued items every `interval` to determine whether a `success` or `fail` functions get called. Returns a Boolean.\n* `success`: Function(Array) : The function that gets passed all queued items if the `test` function returns `true`.\n* `fail` : Function(Array) : The function that gets passed all queued items if the `test` function returns `false`.\n* `interval` : Number : The time in milliseconds between calls of `test`.\n* `context` : Object : The `this` context for all function calls (`success`, `fail`, `test`).\n\nUsage\n--------\n```javascript\nvar TTQ = require('ttq');\n\nvar ttq = new TTQ({\n  test: function(array) {\n    return array.length > 1000;\n  },\n  success: function(array) {\n    this.emit('hundred-items', array);\n  },\n  fail: function(array) {\n    // it doesn't matter. it's in the past\n  },\n  interval: 200,\n  context: this\n});\n```\n\nMethods\n-------\n### push(item)\nPush an item onto the queue.  \n  \n### pop()\nPop an item off the queue.\n\n\nLicense\n-------\nMIT\n","maintainers":[{"name":"mmaelzer","email":"mmaelzer@gmail.com"}],"time":{"modified":"2022-06-27T23:01:20.134Z","created":"2014-01-05T05:32:42.730Z","0.1.1":"2014-01-05T05:32:42.731Z","0.1.2":"2014-02-25T05:26:14.127Z"},"homepage":"https://github.com/mmaelzer/ttq","keywords":["queue","timed","test"],"repository":{"type":"git","url":"https://github.com/mmaelzer/ttq"},"author":{"name":"Mike Maelzer","email":"mmaelzer@gmail.com"},"bugs":{"url":"https://github.com/mmaelzer/ttq/issues"},"license":"MIT","readmeFilename":"readme.md"}