{"_id":"fast-fifo","_rev":"3002888","name":"fast-fifo","description":"A fast fifo implementation similar to the one powering nextTick in Node.js core","dist-tags":{"latest":"1.3.2"},"maintainers":[{"name":"mafintosh","email":""}],"time":{"modified":"2023-09-15T09:59:58.000Z","created":"2019-02-18T20:16:46.382Z","1.3.2":"2023-08-21T14:21:02.140Z","1.3.1":"2023-08-21T13:05:04.718Z","1.3.0":"2023-06-26T21:06:40.439Z","1.2.0":"2023-04-06T11:56:31.882Z","1.1.0":"2022-01-21T13:23:32.168Z","1.0.0":"2019-02-18T20:16:46.382Z"},"users":{},"author":{"name":"Mathias Buus","url":"@mafintosh"},"repository":{"type":"git","url":"git+https://github.com/mafintosh/fast-fifo.git"},"versions":{"1.3.2":{"name":"fast-fifo","version":"1.3.2","description":"A fast fifo implementation similar to the one powering nextTick in Node.js core","main":"index.js","dependencies":{},"devDependencies":{"standard":"^17.1.0","brittle":"^3.3.2"},"scripts":{"test":"standard && brittle test.js"},"repository":{"type":"git","url":"git+https://github.com/mafintosh/fast-fifo.git"},"author":{"name":"Mathias Buus","url":"@mafintosh"},"license":"MIT","bugs":{"url":"https://github.com/mafintosh/fast-fifo/issues"},"homepage":"https://github.com/mafintosh/fast-fifo","gitHead":"16f48e2a25e74d95d50c0922a16922c9016e8a02","_id":"fast-fifo@1.3.2","_nodeVersion":"18.16.0","_npmVersion":"9.5.1","dist":{"shasum":"286e31de96eb96d38a97899815740ba2a4f3640c","size":2271,"noattachment":false,"key":"/fast-fifo/-/fast-fifo-1.3.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/fast-fifo/download/fast-fifo-1.3.2.tgz"},"_npmUser":{"name":"mafintosh","email":"mathiasbuus@gmail.com"},"directories":{},"maintainers":[{"name":"mafintosh","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/fast-fifo_1.3.2_1692627661947_0.22148530796898447"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2023-08-21T14:21:02.140Z","publish_time":1692627662140,"_source_registry_name":"default","_cnpm_publish_time":1692627662140},"1.3.1":{"name":"fast-fifo","version":"1.3.1","description":"A fast fifo implementation similar to the one powering nextTick in Node.js core","main":"index.js","dependencies":{},"devDependencies":{"standard":"^17.1.0","brittle":"^3.3.2"},"scripts":{"test":"standard && brittle test.js"},"repository":{"type":"git","url":"git+https://github.com/mafintosh/fast-fifo.git"},"author":{"name":"Mathias Buus","url":"@mafintosh"},"license":"MIT","bugs":{"url":"https://github.com/mafintosh/fast-fifo/issues"},"homepage":"https://github.com/mafintosh/fast-fifo","gitHead":"1d5429028bb5b5ae0e41fb44ff139b8893603cff","_id":"fast-fifo@1.3.1","_nodeVersion":"18.16.0","_npmVersion":"9.5.1","dist":{"shasum":"75c5dd4df1d53ee5d5442709f51299af8bc2c622","size":3108,"noattachment":false,"key":"/fast-fifo/-/fast-fifo-1.3.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/fast-fifo/download/fast-fifo-1.3.1.tgz"},"_npmUser":{"name":"mafintosh","email":"mathiasbuus@gmail.com"},"directories":{},"maintainers":[{"name":"mafintosh","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/fast-fifo_1.3.1_1692623104538_0.78538848714182"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2023-08-21T13:05:04.718Z","publish_time":1692623104718,"_source_registry_name":"default","_cnpm_publish_time":1692623104718},"1.3.0":{"name":"fast-fifo","version":"1.3.0","description":"A fast fifo implementation similar to the one powering nextTick in Node.js core","main":"index.js","dependencies":{},"devDependencies":{"standard":"^17.1.0","brittle":"^3.3.2"},"scripts":{"test":"standard && brittle test.js"},"repository":{"type":"git","url":"git+https://github.com/mafintosh/fast-fifo.git"},"author":{"name":"Mathias Buus","url":"@mafintosh"},"license":"MIT","bugs":{"url":"https://github.com/mafintosh/fast-fifo/issues"},"homepage":"https://github.com/mafintosh/fast-fifo","gitHead":"ee89ad2f463ac9aa2e30b1679a6a3052e89a160d","_id":"fast-fifo@1.3.0","_nodeVersion":"18.16.0","_npmVersion":"9.5.1","dist":{"shasum":"03e381bcbfb29932d7c3afde6e15e83e05ab4d8b","size":3058,"noattachment":false,"key":"/fast-fifo/-/fast-fifo-1.3.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/fast-fifo/download/fast-fifo-1.3.0.tgz"},"_npmUser":{"name":"mafintosh","email":"mathiasbuus@gmail.com"},"directories":{},"maintainers":[{"name":"mafintosh","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/fast-fifo_1.3.0_1687813600269_0.6422227947459413"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2023-06-26T21:06:40.439Z","publish_time":1687813600439,"_source_registry_name":"default","_cnpm_publish_time":1687813600439},"1.2.0":{"name":"fast-fifo","version":"1.2.0","description":"A fast fifo implementation similar to the one powering nextTick in Node.js core","main":"index.js","dependencies":{},"devDependencies":{"standard":"^12.0.1","tape":"^4.10.1"},"scripts":{"test":"standard && tape test.js"},"repository":{"type":"git","url":"git+https://github.com/mafintosh/fast-fifo.git"},"author":{"name":"Mathias Buus","url":"@mafintosh"},"license":"MIT","bugs":{"url":"https://github.com/mafintosh/fast-fifo/issues"},"homepage":"https://github.com/mafintosh/fast-fifo","gitHead":"36571d6bbe5c088b9dcf08c97b93746fb26d5161","_id":"fast-fifo@1.2.0","_nodeVersion":"16.17.0","_npmVersion":"8.15.0","dist":{"shasum":"2ee038da2468e8623066dee96958b0c1763aa55a","size":2646,"noattachment":false,"key":"/fast-fifo/-/fast-fifo-1.2.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/fast-fifo/download/fast-fifo-1.2.0.tgz"},"_npmUser":{"name":"mafintosh","email":"mathiasbuus@gmail.com"},"directories":{},"maintainers":[{"name":"mafintosh","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/fast-fifo_1.2.0_1680782191733_0.24697690184108523"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2023-04-06T11:56:31.882Z","publish_time":1680782191882,"_cnpm_publish_time":1680782191882},"1.1.0":{"name":"fast-fifo","version":"1.1.0","description":"A fast fifo implementation similar to the one powering nextTick in Node.js core","main":"index.js","dependencies":{},"devDependencies":{"standard":"^12.0.1","tape":"^4.10.1"},"scripts":{"test":"standard && tape test.js"},"repository":{"type":"git","url":"git+https://github.com/mafintosh/fast-fifo.git"},"author":{"name":"Mathias Buus","url":"@mafintosh"},"license":"MIT","bugs":{"url":"https://github.com/mafintosh/fast-fifo/issues"},"homepage":"https://github.com/mafintosh/fast-fifo","gitHead":"f3c244bee44d3395144d1668fcacfea3f66e3a64","_id":"fast-fifo@1.1.0","_nodeVersion":"16.8.0","_npmVersion":"6.14.15","dist":{"shasum":"17d1a3646880b9891dfa0c54e69c5fef33cad779","size":2522,"noattachment":false,"key":"/fast-fifo/-/fast-fifo-1.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/fast-fifo/download/fast-fifo-1.1.0.tgz"},"_npmUser":{"name":"mafintosh","email":"mathiasbuus@gmail.com"},"directories":{},"maintainers":[{"name":"mafintosh","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/fast-fifo_1.1.0_1642771412029_0.6079849012685363"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2022-01-21T13:25:04.748Z","publish_time":1642771412168,"_cnpm_publish_time":1642771412168},"1.0.0":{"name":"fast-fifo","version":"1.0.0","description":"A fast fifo implementation similar to the one powering nextTick in Node.js core","main":"index.js","dependencies":{},"devDependencies":{"standard":"^12.0.1","tape":"^4.10.1"},"scripts":{"test":"standard && tape test.js"},"repository":{"type":"git","url":"git+https://github.com/mafintosh/fast-fifo.git"},"author":{"name":"Mathias Buus","url":"@mafintosh"},"license":"MIT","bugs":{"url":"https://github.com/mafintosh/fast-fifo/issues"},"homepage":"https://github.com/mafintosh/fast-fifo","gitHead":"459c3325c01cbb5b48ee18ea4d1731f29df45105","_id":"fast-fifo@1.0.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.1","_npmUser":{"name":"mafintosh","email":"mathiasbuus@gmail.com"},"dist":{"shasum":"9bc72e6860347bb045a876d1c5c0af11e9b984e7","size":2502,"noattachment":false,"key":"/fast-fifo/-/fast-fifo-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/fast-fifo/download/fast-fifo-1.0.0.tgz"},"maintainers":[{"name":"mafintosh","email":""}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/fast-fifo_1.0.0_1550521006254_0.3648424207354126"},"_hasShrinkwrap":false,"publish_time":1550521006382,"_cnpm_publish_time":1550521006382}},"readme":"# fast-fifo\n\nA fast fifo implementation similar to the one powering nextTick in Node.js core\n\n```\nnpm install fast-fifo\n```\n\nUses a linked list of growing fixed sized arrays to implement the FIFO to avoid\nallocating a wrapper object for each item.\n\n## Usage\n\n``` js\nconst FIFO = require('fast-fifo')\n\nconst q = new FIFO()\n\nq.push('hello')\nq.push('world')\n\nq.shift() // returns hello\nq.shift() // returns world\n```\n\n## API\n\n#### `q = new FIFO()`\n\nCreate a new FIFO.\n\n#### `q.push(value)`\n\nPush a value to the FIFO. `value` can be anything other than undefined.\n\n#### `value = q.shift()`\n\nReturn the oldest value from the FIFO.\n\n#### `q.clear()`\n\nRemove all values from the FIFO.\n\n#### `bool = q.isEmpty()`\n\nReturns `true` if the FIFO is empty and false otherwise.\n\n#### `value = q.peek()`\n\nReturn the oldest value from the FIFO without shifting it out.\n\n#### `len = q.length`\n\nGet the number of entries remaining in the FIFO.\n\n## Benchmarks\n\nIncluded in bench.js is a simple benchmark that benchmarks this against a simple\nlinked list based FIFO.\n\nOn my machine the benchmark looks like this:\n\n```\nfifo bulk push and shift: 2881.508ms\nfifo individual push and shift: 3248.437ms\nfast-fifo bulk push and shift: 1606.972ms\nfast-fifo individual push and shift: 1328.064ms\nfifo bulk push and shift: 3266.902ms\nfifo individual push and shift: 3320.944ms\nfast-fifo bulk push and shift: 1858.307ms\nfast-fifo individual push and shift: 1516.983ms\n```\n\nYMMV\n\n## License\n\nMIT\n","_attachments":{},"homepage":"https://github.com/mafintosh/fast-fifo","bugs":{"url":"https://github.com/mafintosh/fast-fifo/issues"},"license":"MIT"}