{
  "_id": "fast-fifo",
  "maintainers": [
    {
      "name": "mafintosh",
      "email": "mathiasbuus@gmail.com"
    }
  ],
  "dist-tags": {
    "latest": "1.3.2"
  },
  "author": {
    "name": "Mathias Buus",
    "url": "@mafintosh"
  },
  "_rev": "7-2935a3e56fa5dcabf08b5d8de2febfac",
  "description": "A fast fifo implementation similar to the one powering nextTick in Node.js core",
  "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",
  "repository": {
    "type": "git",
    "url": "git+https://github.com/mafintosh/fast-fifo.git"
  },
  "users": {
    "flumpus-dev": true
  },
  "bugs": {
    "url": "https://github.com/mafintosh/fast-fifo/issues"
  },
  "license": "MIT",
  "versions": {
    "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": {
        "integrity": "sha512-4VEXmjxLj7sbs8J//cn2qhRap50dGzF5n8fjay8mau+Jn4hxSeR3xPFwxMaQq/pDaq7+KQk0PAbC2+nWDkJrmQ==",
        "shasum": "9bc72e6860347bb045a876d1c5c0af11e9b984e7",
        "tarball": "https://archive.ito.gov.ir/npm/_packages/fast-fifo/-/fast-fifo-1.0.0.tgz",
        "fileCount": 7,
        "unpackedSize": 5590,
        "npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcaxKvCRA9TVsSAnZWagAA5B8QAJ46sbeeutk6TNBvL5F4\nSg7gWzZKQeVcGCJGNecgPDO2ftFAGK4WP6Jb5se/kDnvYsowi5OGsB22EMci\nbqqfQKx906ZmWH/K5RdsBfCYetp22Y9rueBuhhHXZ8QtwV58GX46CL5qcatQ\nNVVEKFa/UDZNkcvaZOhestjP09m9ucnwrSwFxn8aPnU9H/pw1t5QiwzRZm2d\nthnJIAijKR2qUSvgvtwLC7NcqAYQzClJzoh6nVWTMm7HoqExf3qcPCD4GQ2f\novIn0Z2As/aHdkV4lYYbRNDrRyuh4+jXr4c2JYFNpbMdqk6BpVK50xx0dGtw\n3RPmtFDsD4RjknhoopVD5g+nrwwgFGhKNqhQ/RQwA+iJQlYh9mARxLlQ3FCf\nALH9KB3L2/FvvsCrjro7bH/zCSocEg5XUny7ttRTzYXSKz4juSV/19cMfP84\ni/WRppyRkkKberla7Uh3Vgyu4FvNjnJtco55+3sZex9p6952eeKufmownV5x\nOH4EUAls14kAptCgpbae5jkndvkeCGxwtFUjnSNSMn60SO33+gnnXgD0d9Dd\njap9qE0CVFwTS296nFE3PKg4dVTobX6miglVvZd0vqllfE81AXy16GvyvPtl\n42k+VlYA4ZCj66ZOcNGMLZoZ0llKfgVN+nu2XvL2tZUXC3Z5FH25KBFOdoA0\nv9jb\r\n=bzh5\r\n-----END PGP SIGNATURE-----\r\n",
        "signatures": [
          {
            "keyid": "SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA",
            "sig": "MEYCIQCb4KczbRlm+JUr5eAJ6VXcdI2gtl7pL/vY34JgTMtrIAIhAPaXOANrkqkOl45uXfkttnQr0KNF25quldhIfCrm3fQv"
          }
        ]
      },
      "maintainers": [
        {
          "name": "mafintosh",
          "email": "mathiasbuus@gmail.com"
        }
      ],
      "directories": {},
      "_npmOperationalInternal": {
        "host": "s3://npm-registry-packages",
        "tmp": "tmp/fast-fifo_1.0.0_1550521006254_0.3648424207354126"
      },
      "_hasShrinkwrap": false
    },
    "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": {
        "integrity": "sha512-Kl29QoNbNvn4nhDsLYjyIAaIqaJB6rBx5p3sL9VjaefJ+eMFBWVZiaoguaoZfzEKr5RhAti0UgM8703akGPJ6g==",
        "shasum": "17d1a3646880b9891dfa0c54e69c5fef33cad779",
        "tarball": "https://archive.ito.gov.ir/npm/_packages/fast-fifo/-/fast-fifo-1.1.0.tgz",
        "fileCount": 7,
        "unpackedSize": 5774,
        "npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh6rPUCRA9TVsSAnZWagAAd8MP/0/3N2NRKrnQrQRiBhK3\nBzbH55iCyfFVtCoifzoUityot/WjnpKqoT0oFQYsSQGe7tqGzS7xptlnnDL3\nHIBhTlbDyn8KSXq76Il6wpae+3cCXvpQxr4VI6Q1Ve4G9EPGHS/c23bmRwMk\n/eHzBVZJYkrJsGJudfcfAXw2OmO3kA3SUcltPgzyFRP55d3zSgUncS6E6LYK\nk+vSr7CSBp1W8dy20yHPimlZtgt6l+SorFhaY4C/1Xh6Smg5IBYAejDuMk8O\n8SEfSq5lYuomdrrrkEkMOIi2DVzSVHHKUdUsGg4X5I/siHDd4cU3XrUGbeFV\n6Yj9XLiiCyogdaNyPVtmB+N8dfzOxXf3gnJfE4UFsRUvvnx9uK6YZiVfqWYK\nFZQyETG4HHbA+7ySHREhSinRFx7J9rOnsXJQ2CY+wLh2t9se+wjRfJdsFl2q\nwy40C9SqPRv11BaMsTbq3VbYpnnqmt9Zeq8NVz++knHM2BF0xULT6h+OMAUR\nMK0LT8951i/04bwKTKCg39RQd6dxWbXohqWvW84Rgde1t/5sma649TZ4YZk7\n/L4IO4NwwBV4J6TcGegkYxi8PlnrF9TtVCpi5CHufREU8h+U19xLGoGf48KS\nS7TSiJ14E8s/9LSKojspGXTZ6NeltA6pOkTeW2Z1YhVIrv4vJQrjVCAyyTsL\nYCVL\r\n=HKX+\r\n-----END PGP SIGNATURE-----\r\n",
        "signatures": [
          {
            "keyid": "SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA",
            "sig": "MEQCIDJLj8Kum4ykE311a7c8T/ZFUM5CFtdo8qQLI+BA1JPnAiAIbrgd4VOYaH2QmOxVUK2XA46CtMUGxVxjNh7dLK9jKg=="
          }
        ]
      },
      "_npmUser": {
        "name": "mafintosh",
        "email": "mathiasbuus@gmail.com"
      },
      "directories": {},
      "maintainers": [
        {
          "name": "mafintosh",
          "email": "mathiasbuus@gmail.com"
        }
      ],
      "_npmOperationalInternal": {
        "host": "s3://npm-registry-packages",
        "tmp": "tmp/fast-fifo_1.1.0_1642771412029_0.6079849012685363"
      },
      "_hasShrinkwrap": false
    },
    "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": {
        "integrity": "sha512-NcvQXt7Cky1cNau15FWy64IjuO8X0JijhTBBrJj1YlxlDfRkJXNaK9RFUjwpfDPzMdv7wB38jr53l9tkNLxnWg==",
        "shasum": "2ee038da2468e8623066dee96958b0c1763aa55a",
        "tarball": "https://archive.ito.gov.ir/npm/_packages/fast-fifo/-/fast-fifo-1.2.0.tgz",
        "fileCount": 7,
        "unpackedSize": 6277,
        "signatures": [
          {
            "keyid": "SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA",
            "sig": "MEUCIG1K8+ybhDAkGICmC/6TEYMZhbNwKZkywfhaE/Pj0pJIAiEAlYht9PE9m9dr6OVV1ib7XSYDkDGImCuoiUcwhi0h8kw="
          }
        ],
        "npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkLrNvACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmq8hBAAon9ETr2Rl0ifvGsTAZ1FwTWxwG8s7eyD980hhnNS4LN0oBTl\r\n3xkQNA66+SJSUhi4u19inhXeQeHMMXmWHCEWT/2KIcR+0d1ZMnnb3uYBaCT+\r\nSDYzVvi2q/IxKus4nlD7/3JKS8q7WZOT6PdzTr72Y86M/F0JMFvlUGNbBXMR\r\ng6rldrhLYtsg8QtviA1PN03unv8+Rqh9HBXKqiBMGoSuHVBhQzfNFyaXCPjX\r\naCUHtBN4SyMxlI1ECKfVQUAWzgLNwu3iDFhbo7u/SoxPsQihGZUEplvxa/RL\r\nWJcZ5CxcPbrFufBMatPulnG3a6LEmASr7JhUuZIautdZUBcdUx34ATffZa/g\r\nrOY8It6iDgHBa4wujFvZWpnkWptZTYoqYRE4Hai/JeqoJXLqZ9+ZxrLYmoks\r\nVouiQUiFyBchz5RNsqvHuTuNgywJbM3QT/r7EmgyOb2BcvI89Bm93GGcK9uG\r\naSYOoLTERBb0qxqt2n3NwXxY2+xHAdzxeAtpKGI70djmLYhCjrZAqBXKbTeo\r\nOjROPNIGpT1eKLQDI9F2HZB+Y3pmpTZcFuW4lGimA6qaRgup84wgg5bRKWUe\r\nN4Ks7UGmAziT+WyRzPxnkh9GZQodZn7ugoWtgkECsvx5u20gLH6uSN4Htz1o\r\n9e95VqPeRz0zKO0rkVWEJW/mMaSI1FxC/Qw=\r\n=e5+A\r\n-----END PGP SIGNATURE-----\r\n"
      },
      "_npmUser": {
        "name": "mafintosh",
        "email": "mathiasbuus@gmail.com"
      },
      "directories": {},
      "maintainers": [
        {
          "name": "mafintosh",
          "email": "mathiasbuus@gmail.com"
        }
      ],
      "_npmOperationalInternal": {
        "host": "s3://npm-registry-packages",
        "tmp": "tmp/fast-fifo_1.2.0_1680782191733_0.24697690184108523"
      },
      "_hasShrinkwrap": false
    },
    "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": {
        "integrity": "sha512-IgfweLvEpwyA4WgiQe9Nx6VV2QkML2NkvZnk1oKnIzXgXdWxuhF7zw4DvLTPZJn6PIUneiAXPF24QmoEqHTjyw==",
        "shasum": "03e381bcbfb29932d7c3afde6e15e83e05ab4d8b",
        "tarball": "https://archive.ito.gov.ir/npm/_packages/fast-fifo/-/fast-fifo-1.3.0.tgz",
        "fileCount": 8,
        "unpackedSize": 7908,
        "signatures": [
          {
            "keyid": "SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA",
            "sig": "MEYCIQCItdC3JMMOUu17rd0z9HQVJJT8+7omqM9t/j4jgWd5pQIhAO77/gBRgLanL+NE9H6DG89R4qz+Gw3n49X90JlwgW6M"
          }
        ]
      },
      "_npmUser": {
        "name": "mafintosh",
        "email": "mathiasbuus@gmail.com"
      },
      "directories": {},
      "maintainers": [
        {
          "name": "mafintosh",
          "email": "mathiasbuus@gmail.com"
        }
      ],
      "_npmOperationalInternal": {
        "host": "s3://npm-registry-packages",
        "tmp": "tmp/fast-fifo_1.3.0_1687813600269_0.6422227947459413"
      },
      "_hasShrinkwrap": false
    },
    "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": {
        "integrity": "sha512-VCs8H2h2kGIlCJhfDCxUjVfpSNDvyXxwwzCvVDuCFqkTko+0LMbjH4oy/QePbHLS2bsYoTERvGg8OFq29dRUMg==",
        "shasum": "75c5dd4df1d53ee5d5442709f51299af8bc2c622",
        "tarball": "https://archive.ito.gov.ir/npm/_packages/fast-fifo/-/fast-fifo-1.3.1.tgz",
        "fileCount": 8,
        "unpackedSize": 8305,
        "signatures": [
          {
            "keyid": "SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA",
            "sig": "MEYCIQDJq947iZ6d5p3vSlYc8DatPqSZ0Og3Szd5kRZRAx3BHwIhAIAaDubergL6Luu/JrroDOQFxXSOMjdYNJdJ7w8fndKq"
          }
        ]
      },
      "_npmUser": {
        "name": "mafintosh",
        "email": "mathiasbuus@gmail.com"
      },
      "directories": {},
      "maintainers": [
        {
          "name": "mafintosh",
          "email": "mathiasbuus@gmail.com"
        }
      ],
      "_npmOperationalInternal": {
        "host": "s3://npm-registry-packages",
        "tmp": "tmp/fast-fifo_1.3.1_1692623104538_0.78538848714182"
      },
      "_hasShrinkwrap": false
    },
    "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": {
        "integrity": "sha512-/d9sfos4yxzpwkDkuN7k2SqFKtYNmCTzgfEpz82x34IM9/zc8KGxQoXg1liNC/izpRM/MBdt44Nmx41ZWqk+FQ==",
        "shasum": "286e31de96eb96d38a97899815740ba2a4f3640c",
        "tarball": "https://archive.ito.gov.ir/npm/_packages/fast-fifo/-/fast-fifo-1.3.2.tgz",
        "fileCount": 5,
        "unpackedSize": 5072,
        "signatures": [
          {
            "keyid": "SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA",
            "sig": "MEUCIFk3UxBls8O4g8Zz03z6EOGeV6Sgkd3nXhoGdrtW/jzeAiEAqmJ0rqi88DqE0h2yeWUdmxl2519ZLspS+TheELO1558="
          }
        ]
      },
      "_npmUser": {
        "name": "mafintosh",
        "email": "mathiasbuus@gmail.com"
      },
      "directories": {},
      "maintainers": [
        {
          "name": "mafintosh",
          "email": "mathiasbuus@gmail.com"
        }
      ],
      "_npmOperationalInternal": {
        "host": "s3://npm-registry-packages",
        "tmp": "tmp/fast-fifo_1.3.2_1692627661947_0.22148530796898447"
      },
      "_hasShrinkwrap": false
    }
  },
  "name": "fast-fifo",
  "time": {
    "created": "2019-02-18T20:16:46.254Z",
    "1.0.0": "2019-02-18T20:16:46.382Z",
    "modified": "2026-05-06T08:26:53.245Z",
    "1.1.0": "2022-01-21T13:23:32.168Z",
    "1.2.0": "2023-04-06T11:56:31.882Z",
    "1.3.0": "2023-06-26T21:06:40.439Z",
    "1.3.1": "2023-08-21T13:05:04.718Z",
    "1.3.2": "2023-08-21T14:21:02.140Z"
  },
  "readmeFilename": "README.md",
  "homepage": "https://github.com/mafintosh/fast-fifo"
}