{"_id":"heapify","_rev":"12-54d274ff5093da32c62ec8e2f19900b8","name":"heapify","dist-tags":{"latest":"1.0.2"},"versions":{"0.1.0":{"name":"heapify","version":"0.1.0","keywords":["priority queue","queue","heap","minheap","maxheap","binary heap"],"author":{"url":"https://luciopaiva.com","name":"Lucio Paiva"},"license":"ISC","_id":"heapify@0.1.0","maintainers":[{"name":"lucio","email":"luciopaiva@gmail.com"}],"homepage":"https://github.com/luciopaiva/pqjs","dist":{"shasum":"e2f244b684bc994a1507e6a07b185e682ee71095","tarball":"https://registry.npmjs.org/heapify/-/heapify-0.1.0.tgz","fileCount":6,"integrity":"sha512-Sms+K9jBKUDv7mfu/jGKOGrd5HEsCX3B12w7qV1apivoBu6HAaiLNP0zDbpGoqdR7lxNOvZ3e613aXBO3OHuuQ==","signatures":[{"sig":"MEUCIBKnCzQRmQ68LhJMSo8pAKSNfRQqO5Y2ymSrs/PVtNakAiEA3FxSsmXMiUtd+hNm01NB8Qrmo+5j9zAS3xCxyvtHKbA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":7998,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJePyx4CRA9TVsSAnZWagAA4e8P/0v6W01OryZ1o+u3r0mM\nHShwDk/KHwMmjFHj5i1wtMYzh66vUJwpnoYSb4eKNEJi5Ru7PGuC9nsQNUtk\n3SeYeCnkzI6LXJAcHvcNc3YoQra1y4AsR8yNcqETpLqvNv7mcr6d90qn563j\nbN/ww/Pj7wi33iBhic1gvYWa4PQVeRDGC2fINmNOe3AAQ/Kha0EaZXTDoAG4\nn3ipgoQyT4X0b4nMSA7m6ufMkcKybHU5kQIZjSuZlbGI0IkpQ959EkffGqKS\nBTV+28agGagZguvnnGwl1+FS5bZ9UmMR7xLSiP+meFOfdg1aHIJfuvzLed5e\nZSZFb+/Xax9vF+fsCDcXIJcXQMepBWfMvS3+IA1ilLI79nqah6BRGlkNZuSQ\n3nhvvk23VpvMdOmfUj6HTKVZZxwS7TPwNXkYGcucgRT+NiHd1E5z4/pvSk4o\nL3LhqV1IykdORZeZr3nnYYoZPows/7HOOj5JbEBSgShkX1Wc9a5SO0+WmIFC\nTK05pj2K5aJV96NHbhnQt3RzW1GQ9/q4mpw9t9zzPP67wD6X2Kj16r4Ak60y\n77SDPRm05NafMrbAh+KvF4gHKjvknPFVMV0QCrkaLQB//PbOCCJFaddGjQ+z\n2j7kvbNPcBnT0AzfbQd2EFl0zgGTe/aKI5bTAv2dJMNaBohtiQA1MZaJb4jX\nac++\r\n=id/x\r\n-----END PGP SIGNATURE-----\r\n"},"main":"heapify.js","type":"module","gitHead":"7659e028f5a8074acabbd9c611c037df2c0f801d","scripts":{"test":"node test.js"},"_npmUser":{"name":"lucio","email":"luciopaiva@gmail.com"},"_npmVersion":"6.13.6","description":"A blazingly fast JavaScript priority queue","directories":{},"_nodeVersion":"13.8.0","dependencies":{"tape":"^4.13.0"},"_hasShrinkwrap":false,"devDependencies":{"flatqueue":"1.1.0","tinyqueue":"2.0.3"},"_npmOperationalInternal":{"tmp":"tmp/heapify_0.1.0_1581198456190_0.41222034626645554","host":"s3://npm-registry-packages"}},"0.2.0":{"name":"heapify","version":"0.2.0","keywords":["priority queue","queue","heap","minheap","maxheap","binary heap"],"author":{"url":"https://luciopaiva.com","name":"Lucio Paiva"},"license":"MIT","_id":"heapify@0.2.0","maintainers":[{"name":"lucio","email":"luciopaiva@gmail.com"}],"homepage":"https://github.com/luciopaiva/heapify","nyc":{"all":true,"include":["heapify.mjs"]},"dist":{"shasum":"66a810d55396a051ae1d1a7f3a560210d7b27ddd","tarball":"https://registry.npmjs.org/heapify/-/heapify-0.2.0.tgz","fileCount":8,"integrity":"sha512-vJHToNRB+jlkTLnnYkwKfPk3AYoqVCxnMiDiRoHbkaokvxTJa6uxXZOokZToc4dG8Z3p94Ao2YMV+n5/Ia4TFA==","signatures":[{"sig":"MEUCIQDNB3PgLimORZae8Tj7wpPt25s5xmCCRsUHgODeLmGsjgIgXgb+8O5FSlisVKgOndP9Wd+8CpwFkCDILMyIhi56r0Q=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":20680,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeaDxACRA9TVsSAnZWagAA5w8QAJyXav4gApUQPyfIpQ+r\nh26XzIWiCSP5FsDkSitWO5shWn81EiK7dJzwH/52vzIlIq76/eJBfyB2VCWg\nTTSn1cQKYg9eXkrDK+SsLfo7iXAeJQssx0GDnjEVdZaIvc2iJp5/0mn8Qj5D\no7wawnR3OVh0XQ0CEvSC6rvmbs3yia5xffFMxfYXvAx0izrWwKVofYf9rFfS\nzvbf/kyHm2Xos4r5JchZ6XJXstZA4/dW/aq1GhylPa6tHv6z0Qbhqv3czQ09\nXyGczdXvc8yPiny3fq1TrHuF7tpHREBj56vgBnG/bFZ0A/pvBNOqyInAj9RU\noofxoLuK1zZbRrwNFifYmcCLP6I9NOZBLmRzy3/64Z92Gk2Y1wi+21BK/DoT\n2nWcpgneB02iPC2Ujr6lZxVVyMP1yKWmWB7QTn3x0PnZoufaberClCToJovb\nnvrik9I7dU6TmVLX8uLbd2FzPu/heODBA5MB8fbGXgxu6t8oRhwQxkw3f7I6\nHzecbG/Ed1gOlqHIUCzrVt7mB5SutZRRADwMeHeynrDrDQpl/h/XMc8VDGa4\ncsEJLUBOVM2AkT2MIj/r9Sz3rVFmzGdLDUIFCwiVs0g1tIMETw3paWLOMALq\nsfj6kcle4MX1hNYwY47j9jvI2683nDDYWYxsdOoKRo7Rgy6rK7MXjefLIdRY\nhWQy\r\n=uK8Z\r\n-----END PGP SIGNATURE-----\r\n"},"main":"heapify.mjs","gitHead":"ef91f2caefe7689edcf61987e6d74691c90a61fc","scripts":{"test":"nyc  --reporter=html --reporter=text mocha --require esm","bench":"node bench.mjs","count":"cloc heapify.mjs","report-coverage":"nyc report --reporter=text-lcov --require esm > coverage.lcov && codecov"},"_npmUser":{"name":"lucio","email":"luciopaiva@gmail.com"},"_npmVersion":"6.13.6","description":"Blazing fast JavaScript priority queue","directories":{},"_nodeVersion":"13.8.0","dependencies":{},"_hasShrinkwrap":false,"devDependencies":{"esm":"^3.2.25","nyc":"^15.0.0","cloc":"^2.5.1","mocha":"^7.0.1","codecov":"^3.6.5","flatqueue":"1.1.0","tinyqueue":"2.0.3"},"_npmOperationalInternal":{"tmp":"tmp/heapify_0.2.0_1583889471716_0.4056275680419448","host":"s3://npm-registry-packages"}},"0.2.1":{"name":"heapify","version":"0.2.1","keywords":["priority queue","queue","heap","minheap","maxheap","binary heap"],"author":{"url":"https://luciopaiva.com","name":"Lucio Paiva"},"license":"MIT","_id":"heapify@0.2.1","maintainers":[{"name":"lucio","email":"luciopaiva@gmail.com"}],"homepage":"https://github.com/luciopaiva/heapify","nyc":{"all":true,"include":["heapify.mjs"]},"dist":{"shasum":"0a01011ca1b66faa834fdc58b2ba50caf918ba37","tarball":"https://registry.npmjs.org/heapify/-/heapify-0.2.1.tgz","fileCount":8,"integrity":"sha512-VVFq/1Se0rCN+AdaQdGOetvxG+5ewyVpSbtRzheHEFLSW/VQWqiHDqqK07AbArMgPi5UVupCnXzrzEflxxTVYw==","signatures":[{"sig":"MEUCIC6QRLTECS0N9j8yht5yDfcNzBtB7DkkeZau1UNhRvOHAiEAkcAycUtkGpWAcvKxw6d0THkQOMNwmfVvS38O+sq8nAE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":21672,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeaDzkCRA9TVsSAnZWagAAeKoP+QADNkI+lKc2P1U8MXBx\n8RuUYeAKrVfDH8BVLkss9GUA83tE3jlF/CAjrVyN7jeeaT9vDWFDgpHSimRc\nZwzWzuj2f7AsPgYmzXrzg/uUXnzSt8FmJTZJaOlqkmxr6jW08FVXBi10AX3j\nd1ix1nSzNbeMhoJtxS2YxoPwc0VR2vEoaDvWaZJ7SyOZ6ZTGrBXdJPlCe6hw\nWzbR1W8zmKvgMlkl+76PpJwcULNmgOeJjGuy6/k090iwpTT7W5FQUkZhx03A\na7zC/dAWZWX2VoFn9PgiOMFKqNcb0J/SaajFGlEvdDyTO4v5AkTf0IdP/jzB\nDqvEzrl87MXSJPNKW2qJCXhYZsr8RA/SnG5spj6a/zdIdEL9//BYlig6P80S\n/AKnlufTqzDyBlVrEkdqe6kejLqC9wkTbbsErQkEwE92tK631Mer3SR8FSFA\nz8AMrfb4l/hUIMJtKSdFd98l/70KmHnmxvTweidQqwnqFGgWdlteDVZEXt7I\ndixoKRitUamnGSBqWNLj74Cjy2HTAwzPte+2IgmIXpYwLhmOQHXXIMSDBZZ5\n7m0cGb2jvk8aOSa8jWsVyO+q0dyCYccv+8yGH4YbpXCB3mIyUEmxfd3rQ6Kw\naGWWjVtvBP1O4jlVmpINxeiioLF8WnRzanEAe9CBIhA2rG7/ehq/kqQa94/I\n99wB\r\n=KI2A\r\n-----END PGP SIGNATURE-----\r\n"},"main":"heapify.mjs","gitHead":"22969fca203f3c14b1a45ff72915705c9d92730a","scripts":{"test":"nyc  --reporter=html --reporter=text mocha --require esm","bench":"node bench.mjs","count":"cloc heapify.mjs","report-coverage":"nyc report --reporter=text-lcov --require esm > coverage.lcov && codecov"},"_npmUser":{"name":"lucio","email":"luciopaiva@gmail.com"},"_npmVersion":"6.13.6","description":"Blazing fast JavaScript priority queue","directories":{},"_nodeVersion":"13.8.0","dependencies":{},"_hasShrinkwrap":false,"devDependencies":{"esm":"^3.2.25","nyc":"^15.0.0","cloc":"^2.5.1","mocha":"^7.0.1","codecov":"^3.6.5","flatqueue":"1.1.0","tinyqueue":"2.0.3"},"_npmOperationalInternal":{"tmp":"tmp/heapify_0.2.1_1583889635738_0.6854421400525823","host":"s3://npm-registry-packages"}},"0.3.0":{"name":"heapify","version":"0.3.0","keywords":["priority queue","queue","heap","minheap","maxheap","binary heap"],"author":{"url":"https://luciopaiva.com","name":"Lucio Paiva"},"license":"MIT","_id":"heapify@0.3.0","maintainers":[{"name":"lucio","email":"luciopaiva@gmail.com"}],"homepage":"https://github.com/luciopaiva/heapify","dist":{"shasum":"1fb895da403c72505965cf9ca70e21357b08b523","tarball":"https://registry.npmjs.org/heapify/-/heapify-0.3.0.tgz","fileCount":14,"integrity":"sha512-7vUfc40vinwdRLIaAH/LFp/VrNGVbGLLwGxuUcgh+SDJi4TZYHYABsR6uDiGUUZYj6YdSoiIW59o43GLRultgg==","signatures":[{"sig":"MEYCIQC4yXNld8iEuCy5/kLjblg0v9S54g9Jz4S8a95+mGySWwIhAPTvV0DKPScS7jOi8DigTqVaonpQuXMm061FwBrrEY1a","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":47945,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfH2ZRCRA9TVsSAnZWagAA8UwP/0x7ip08zx4htCVCfS/Z\n0gLbVk+iEEwEV1q+0H7Ma8c8ERNa939GxWnJIJrnBot6DB/8fYDx/0WJzSc5\nGngaLvrMZD3mDLazEGP+5dKYPYRbuvGpMmmNYOK5KsjRz2TF11RGqV8FQKA/\nl/tzJ2Zxr8CS0eZXeCXg7G/vHuc3KN6bGCwOm3qbBWM/UtV7499Aln8u2+hi\nUYYelDiA8eh5upVHw4lDspru5WOEMwE7vwgHkGv7JOJWTFTR3XV3TcXquNkr\nJrj3m9/EsfLeOMVPdnYOs0hQSRB6b6VR7VCsWl4o2EPwbct0d/oZ7uXEYKVh\nrKFvdIvABxRg6VX9srpmZcLAwJvH5c9wrKtnYKWk/mr5nld32DxvEjtLmIPL\nLuIG/Ils9D6hpPN2BB628a3lVBWISNbHXdNuJcwnWpjPGTb/tYc0NIIppb8p\n16S+Ay2DqLv6iuXlIfoR6UfL9MD6HIxO2KFCTF0VZwUS4e/welflt79GvWjW\njpD2cZa29jYjsxgu0bddenXzVXjD4gu3DDiCPWa/rv8niU1hjlhP6P08EpRk\nPULULywHtFH8kvWqwguPJK0jfKrKDh/9djSAtdxMak92w98GQChkUyA4OPm9\nRP4Qr2yY6owFpwq6uzlKCmTcmVxRIwgm55oFs6D2asOcL9YuqqR1THtkbX/j\nQFXw\r\n=WEWx\r\n-----END PGP SIGNATURE-----\r\n"},"main":"heapify.mjs","gitHead":"61d1e7b2b9b411b7f887ec997cdf14ed93f937d9","scripts":{"test":"c8 --reporter=html --reporter=text mocha --recursive","bench":"node bench.mjs","count":"cloc heapify.mjs","linter":"eslint *.mjs test/**/*.mjs","report-coverage":"c8 report --reporter=text-lcov > coverage.lcov && codecov"},"_npmUser":{"name":"lucio","email":"luciopaiva@gmail.com"},"_npmVersion":"6.13.6","description":"Blazing fast JavaScript priority queue","directories":{},"_nodeVersion":"13.8.0","dependencies":{},"_hasShrinkwrap":false,"devDependencies":{"c8":"^7.1.0","cloc":"^2.5.1","mocha":"^7.1.1","eslint":"^6.8.0","codecov":"^3.6.5","flatqueue":"1.1.0","tinyqueue":"2.0.3"},"_npmOperationalInternal":{"tmp":"tmp/heapify_0.3.0_1595893328541_0.7605286287850639","host":"s3://npm-registry-packages"}},"0.4.0":{"name":"heapify","version":"0.4.0","keywords":["priority queue","queue","heap","minheap","maxheap","binary heap"],"author":{"url":"https://luciopaiva.com","name":"Lucio Paiva"},"license":"MIT","_id":"heapify@0.4.0","maintainers":[{"name":"lucio","email":"luciopaiva@gmail.com"}],"homepage":"https://github.com/luciopaiva/heapify","dist":{"shasum":"34701b336f43059e0b3deebb4887d28f0fc073b2","tarball":"https://registry.npmjs.org/heapify/-/heapify-0.4.0.tgz","fileCount":20,"integrity":"sha512-vNb/lMpITi80EH0mUNoAOUromDvNJGIbGZhbGKpQbSdXYWMNxsujsmgMlW6HFd25VTI8Sq+Am9wqkSRYfOxPyQ==","signatures":[{"sig":"MEUCIGChk87cAMB9bTizDi9dz918XO0XKiuxhCXjhpIL9WoaAiEAkkGKN59ig6J2Ut+g0gL9wYMv55fXdlLKvE2nDfeNZ78=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":64196,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfZ/fDCRA9TVsSAnZWagAATL4P/RlUDV/iv3eJNbed3LO8\n1Bv/VvI94jgEHREcSbb3BbtIWMdDpGxU4Da+Sfzf2thwDwth/YdGRnVin+PZ\nDu1qgfDyFRmJWZoEFVfBWi3l+dMW5l2wW8rP4ChHHqASMY3BzJpwuBKnSOGu\nG8bO5TRPFf3r7MudtUqEX49gHUvq14nM7AWUbypC9CK3D1NcSXldjSDqdWnt\nel7nYf7/G1rQm1bwz/Z6xRf3NZhdhfyITwCEHduKrKUAw2+i4IGsZhjGWF3O\neHFlv31W2OW0Zk9sVCWpa/OAgKkECEHyi4OrzFA3d8oTWmOlcqxeqK2+Ahf0\nv5TZF7Zw7/ttyHLFe30OUFwd+g9RmI0mQ5Mpk539KI3eMMsRBXgN6dyxht+F\nIIgT0tt8oEaUGyA7FP+nG17JaT7RJcYjzoe2Ee+JJvmWLXSJ1euXYT5RX1Gk\niz3t7/5yXO2uvhB7RQDGIM/v4D+AfBp7mCVjYqI7DSknuLssA5ODVSj+UtrG\nZU6EX+jdbKdyyatB1+MRasbI7P7DMdoVeD1AF33jzyhd8RdnOrWwLu3+TP+t\nJcBWnZ6J177O5teIRinHHFKotoAiqgQXhL+TZ1mSFvH5kUjPmb6MLuTG7WcB\naw23Gk7Lu7AzMJNLiY4gX1eSUWAc9eYq5KwGpm1EGZVws/HPXZlvlybwb/SM\nQ9lh\r\n=8dUD\r\n-----END PGP SIGNATURE-----\r\n"},"main":"heapify.mjs","gitHead":"944ae28f001da67f30e635c633349adbefe92a92","scripts":{"test":"c8 --reporter=html --reporter=text mocha --recursive","bench":"node benchmark/index.mjs","count":"cloc heapify.mjs","linter":"eslint *.mjs test/**/*.mjs benchmark/**/*.mjs","report-coverage":"c8 report --reporter=text-lcov > coverage.lcov && codecov"},"_npmUser":{"name":"lucio","email":"luciopaiva@gmail.com"},"_npmVersion":"6.13.6","description":"Blazing fast JavaScript priority queue","directories":{},"_nodeVersion":"13.8.0","dependencies":{},"_hasShrinkwrap":false,"devDependencies":{"c8":"^7.3.0","cloc":"^2.5.1","mocha":"^7.1.1","eslint":"^6.8.0","codecov":"^3.6.5","flatqueue":"1.1.0","tinyqueue":"2.0.3","fastpriorityqueue":"0.6.3","google-closure-library":"20200830.0.0"},"_npmOperationalInternal":{"tmp":"tmp/heapify_0.4.0_1600649155331_0.5394362047541648","host":"s3://npm-registry-packages"}},"0.4.1":{"name":"heapify","version":"0.4.1","keywords":["priority queue","queue","heap","minheap","maxheap","binary heap"],"author":{"url":"https://luciopaiva.com","name":"Lucio Paiva"},"license":"MIT","_id":"heapify@0.4.1","maintainers":[{"name":"lucio","email":"luciopaiva@gmail.com"}],"homepage":"https://github.com/luciopaiva/heapify","bugs":{"url":"https://github.com/luciopaiva/heapify/issues"},"dist":{"shasum":"f9e50c2ff7876ec30d5a839f24a6057f7a10cf56","tarball":"https://registry.npmjs.org/heapify/-/heapify-0.4.1.tgz","fileCount":21,"integrity":"sha512-m16Gw7M+fjhodkDr+wJZ5xmPS1rNtOkkYQvnxrynM0YclN4gWmwssf6m6ESKIYm3jg8Aq8uXuR2jFEkW24SDPA==","signatures":[{"sig":"MEUCIGTjFPe6+wsfwPqSOgDGrgWL2QvSJC3bz1/oQpROCD0oAiEAxnz/5TAUZ6JAnKsZpVd4YYGRcI+hPGayJIkKr4KWchk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":65397,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhym2lCRA9TVsSAnZWagAAUJIP/2MiSVf/vSpKuvzFqGUC\nod2ESq+J1gSsqzVQ2LLbpxgRc5lPQ0H5dQssQHlFFP42W9ibodyOYeOyVaB+\nxGuEX0q5QLAjpq/NeL3h9eSU/4Jus4J4/MxCu9bGODku2vlvHidktddEDgmv\n9a9BtkWX253Xojs53t8IF3xnk59ohUpAXXJqrW8UyLq3qZ1x0JprCuBlMpyF\nH0LZ+Wdsz1EviHD+4UHClbw671U/ssNMOTuhviGkpi8u06T3fa0BnCo6Ut2e\nodHCu4aF1YZCSlkYqNshnbPVRoATlr4X/BTZYSS/kLH3W21WLMjPIq05m+vM\nsF1R6WH9cqvaR+p5VTD5xHFxs7+OnA8A8kntjnZUHDGpxj76M+5Q/K6srloZ\nDAlQ+BaU/UE33UlF+uevmy1ozj3BpKRcddXm/IEydTgustOhnZ8E9Osq93Ce\nFJ2Xb7jlckdR+/qtfL3fcvaZfO45X719QX7wJuSPzwxhjiaQ80JEs5DPmhRN\nQUDdt6wEQBjtvpyK9U1wYsdQ7DTjNt4IFzVPdBKQKnAAfsjyuGH5prvViFMc\nYUOBnJEsMcChiBgYQfSVHg5ZQuvk/DPy4shUxGjhdy/cc/qPzr9gO1dBBtIt\noa1VcdekJT8k4xf4x8Lfj3NP1f3qnABE2+ij+UaqpL2teDLdEFQU13Y4iHrH\nBC1F\r\n=XrLd\r\n-----END PGP SIGNATURE-----\r\n"},"main":"heapify.mjs","gitHead":"f995cf93a009b683dfa271d35a13f2c6eb0c9bc0","scripts":{"test":"c8 --reporter=html --reporter=text mocha --recursive","bench":"node benchmark/index.mjs","count":"cloc heapify.mjs","linter":"eslint *.mjs test/**/*.mjs benchmark/**/*.mjs","report-coverage":"c8 report --reporter=text-lcov > coverage.lcov && codecov"},"_npmUser":{"name":"lucio","email":"luciopaiva@gmail.com"},"repository":{"url":"git://github.com/luciopaiva/heapify.git","type":"git"},"_npmVersion":"8.3.0","description":"Blazing fast JavaScript priority queue","directories":{},"_nodeVersion":"17.3.0","_hasShrinkwrap":false,"devDependencies":{"c8":"^7.3.0","cloc":"^2.5.1","mocha":"^9.1.3","eslint":"^8.5.0","codecov":"^3.6.5","flatqueue":"1.1.0","tinyqueue":"2.0.3","fastpriorityqueue":"0.6.3","google-closure-library":"20200830.0.0"},"_npmOperationalInternal":{"tmp":"tmp/heapify_0.4.1_1640656293360_0.33581749673810246","host":"s3://npm-registry-packages"}},"0.5.0":{"name":"heapify","version":"0.5.0","keywords":["priority queue","queue","heap","minheap","maxheap","binary heap"],"author":{"url":"https://luciopaiva.com","name":"Lucio Paiva"},"license":"MIT","_id":"heapify@0.5.0","maintainers":[{"name":"lucio","email":"luciopaiva@gmail.com"}],"homepage":"https://github.com/luciopaiva/heapify","bugs":{"url":"https://github.com/luciopaiva/heapify/issues"},"dist":{"shasum":"43e301280bfeeba4feab2955e84e3f991ff96be5","tarball":"https://registry.npmjs.org/heapify/-/heapify-0.5.0.tgz","fileCount":22,"integrity":"sha512-TDVmyEfnJ4+UvBlRJxvCU879kgBOeTbSkXSdK1oZuEZ6vYKpDlVk4zMRc22Dbj6zwYm0p3h2T0rRe1b8Iiu1Kw==","signatures":[{"sig":"MEQCIGBycJPaSoZ8OdMUgywwaQje2Q4JFqmg3VxJ7SF5sKRBAiALefHiXxVyJQINknf3CrzGJquOlfNWavqnDoNZNK0uMQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":66952,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhywK/CRA9TVsSAnZWagAA9UgQAKFoOPqjg55/HkVWgJCC\nnBElbjmhd73fWZWt9S+S8sdQYYigznq/SN++CkUmareLZSlpfqMEfgphCLO4\nKgzVUB3CPwpnfng8z0iaC8UF/P4R/ge9hieiREtNgA2ygiiK+U9kr+CUSnOp\nduKRbxuVkcOFCgNvzMLoIHdosupZiNdWhl5TAMQEU7zeu1TXaYQh7DT9jKsQ\nb3488Fp/YtmOf5/cJgylgti6bLiJoS06ikY37vbqk7/GDIvuyeQ1CKub/6xI\n8rbCE3VwaHB6w0QwJ1zWzqFuSzz9dhbfOiq7p7+syFfYqI6gunWyUF25i6S7\nd0s9UcJjSI4Gmn3mWhZYTWL1UjzQ9DHzhLrd4m9dEW80FCg0/2th95nD6LVl\naooru1C3nyWIPRXFkR37Cokh4datDHzNWHfaZkZJCmiyxneTjnrV5X7YKTht\n17K2H13RHwKJg0OVU/h0ACH51QBI1lpYrsqhUNIMLSU4KGpVIY4LslIRzgFn\n1d05pKOTesy34KdgY+WxCOs51IDzuC0J6Z7D+WX+kLYxUY5RsWRVnCi/J9+1\nLr+0YmrI4+rsuS7JdNVgQYQiu6g4X2muMFeKSHvEu210PdHnG7gNr7VOT9ng\nI4EAAmK9PFj63ramQTBMb/KsOIYGrYmHTkbcd3asTLHQiM7O+YAE/JcfxMF5\nv0l7\r\n=l12v\r\n-----END PGP SIGNATURE-----\r\n"},"main":"heapify.mjs","gitHead":"eacd4d57d6e28acb77ca399e102f0589f2acc052","scripts":{"test":"c8 --reporter=html --reporter=text mocha --recursive","bench":"node benchmark/index.mjs","count":"cloc heapify.mjs","linter":"eslint *.mjs test/**/*.mjs benchmark/**/*.mjs","report-coverage":"c8 report --reporter=text-lcov > coverage.lcov && codecov"},"_npmUser":{"name":"lucio","email":"luciopaiva@gmail.com"},"repository":{"url":"git://github.com/luciopaiva/heapify.git","type":"git"},"_npmVersion":"8.3.0","description":"Blazing fast JavaScript priority queue","directories":{},"_nodeVersion":"17.3.0","_hasShrinkwrap":false,"devDependencies":{"c8":"^7.3.0","cloc":"^2.5.1","mocha":"^9.1.3","eslint":"^8.5.0","codecov":"^3.6.5","flatqueue":"1.1.0","tinyqueue":"2.0.3","fastpriorityqueue":"0.6.3","google-closure-library":"20200830.0.0"},"_npmOperationalInternal":{"tmp":"tmp/heapify_0.5.0_1640694463093_0.4771221701603017","host":"s3://npm-registry-packages"}},"0.6.0":{"name":"heapify","version":"0.6.0","keywords":["priority queue","queue","heap","minheap","maxheap","binary heap","heapsort"],"author":{"url":"https://luciopaiva.com","name":"Lucio Paiva"},"license":"MIT","_id":"heapify@0.6.0","maintainers":[{"name":"lucio","email":"luciopaiva@gmail.com"}],"homepage":"https://github.com/luciopaiva/heapify","bugs":{"url":"https://github.com/luciopaiva/heapify/issues"},"dist":{"shasum":"d226094f57821c998dcbc5f2e7faab91fbcfe3fc","tarball":"https://registry.npmjs.org/heapify/-/heapify-0.6.0.tgz","fileCount":6,"integrity":"sha512-TeTASfpsbj7CndSUiFHHAcFLV1vbHkpBzoWT7Eonxq8Jxv5O0KQqv9P9sWF6h+R5vZ8126+pxB1EX8CZtOPduw==","signatures":[{"sig":"MEUCIC8B26w3zfXGkM5p5TTzCMfz6fCTbgXAzE9knar3vmZeAiEAk8aiRzMfzfuAGnHvPXrM74w0/h7KM54BhN8AJm0PZWM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":17918,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh4qsVCRA9TVsSAnZWagAA8KYP/irp/aH7s8nn8wfdSEW3\nc8zsXkZnWYiFotCHUO3VaWDW47n1CabTsV1ZkNKoSgJhZvzEc+qm2Wtlx7NL\ny3hkEiFWNVz8dehuFsdja+Kg5NuF4gg+VeC/YU+Wz+7uG8peTWTduNFenPYf\nanYqCYGJdIKhDA3zlw0d93bylt2149rkcoG2u5rsL9V+hRmz+kde600WktHb\nK3DDPc/s4jqORiYEhFfppbT0jGVVXDnbByYG1dXp3k/nBpIwcfLxEQU3PXen\n0W0G16aPwTSgRF8EHrsTLDQnZoNIJtGNj4fJa+iTiPLSWLceNTOf0Opu9Rn8\nKAvZSUAYFgNeepEASfmvQjbCGSfiP3KY1UHfUR5DIVIQ56bs+fAUDV+53MIx\nhiAWu2s2A8FItQTqzFT19kl+Z2UVyX+d8ZI6/X54WgYh+743k9WEzJ+jvL1q\nEZrT1Wv1ff9+kiwfs4r7trkMxJVfZ495V9bDLUTuRnwt90QjEQbR9v8+Nk9I\ndN3XxDY21LDUiGdpap5tcskfDWF5wKkfsAmKABlTJr/5VctxuftZs/hmNUaD\ng1beWY4/zLyqB+9gZEPsM9gRsH3C72ibDQ+dYtKFKxbIsRsch+TREav3zqsJ\n7q+PA2Y0jOLoUt+heVuiUbGG+rh6zeKHEPrDHMPWATioDaAgiNau0dBr1aqq\nOusn\r\n=gwHo\r\n-----END PGP SIGNATURE-----\r\n"},"main":"heapify.js","types":"heapify.d.ts","module":"heapify.mjs","browser":"heapify.js","gitHead":"07557afd404903aaebfbe08d3017d59f893c5837","scripts":{"lint":"eslint . --ext js,mjs,ts","test":"jest --coverage","bench":"node benchmark/index.mjs","build":"npm run clean && webpack --stats errors-warnings --mode=production","clean":"rm -fr dist","count":"cloc src/heapify.ts","watch":"npm run clean && webpack --watch --mode=development","release":"ENABLE_PUBLISH=true npm publish ./dist","build:dev":"npm run clean && webpack --mode=development","build:prod":"npm run clean && webpack --mode=production","prerelease":"ts-node scripts/prerelease.ts","integration":"npm run build:prod --silent && cd test/integration && ts-node --project scripts/run.tsconfig.json scripts/run.ts","prepublishOnly":"ts-node ../scripts/prepublish.ts"},"_npmUser":{"name":"lucio","email":"luciopaiva@gmail.com"},"repository":{"url":"git://github.com/luciopaiva/heapify.git","type":"git"},"_npmVersion":"8.3.0","description":"Blazing fast priority queue","directories":{},"_nodeVersion":"17.3.0","_hasShrinkwrap":false,"devDependencies":{"cloc":"^2.5.1","jest":"^27.4.6","eslint":"^8.5.0","codecov":"^3.6.5","ts-jest":"^27.1.2","ts-node":"^10.4.0","webpack":"^5.65.0","flatqueue":"1.1.0","tinyqueue":"2.0.3","ts-loader":"^9.2.6","typescript":"^4.5.4","@types/jest":"^27.4.0","@types/node":"^17.0.5","webpack-cli":"^4.9.1","@types/webpack":"^5.28.0","fastpriorityqueue":"0.6.3","google-closure-library":"20200830.0.0","@typescript-eslint/parser":"^5.8.1","fork-ts-checker-webpack-plugin":"^6.5.0","@typescript-eslint/eslint-plugin":"^5.8.1"},"_npmOperationalInternal":{"tmp":"tmp/heapify_0.6.0_1642244885424_0.31269572025980064","host":"s3://npm-registry-packages"}},"1.0.0":{"name":"heapify","version":"1.0.0","keywords":["priority queue","queue","heap","minheap","maxheap","binary heap","heapsort"],"author":{"url":"https://luciopaiva.com","name":"Lucio Paiva"},"license":"MIT","_id":"heapify@1.0.0","maintainers":[{"name":"lucio","email":"luciopaiva@gmail.com"}],"homepage":"https://github.com/luciopaiva/heapify","bugs":{"url":"https://github.com/luciopaiva/heapify/issues"},"dist":{"shasum":"bca376afd7e30c38c6e9c6c41feb57d9fc02cf83","tarball":"https://registry.npmjs.org/heapify/-/heapify-1.0.0.tgz","fileCount":8,"integrity":"sha512-w0Rqc6QpGV8f1aihuKMSyzzTlb0cEvYTqJpDbo44Q+2gpYvwNZLVB03/FTwfYRzGIzWtK+pRel+DFa72qX2ILA==","signatures":[{"sig":"MEYCIQDPVYlEEviq8a6X7+4XP0Sq+IklnyCnm4ynHArbXqCfUAIhAO3lmSFlsGfcX/0pF7Fyoc/XIT/wVg4lczi3qgWRjhrn","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/heapify@1.0.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":37408},"main":"heapify.js","types":"heapify.d.ts","module":"heapify.mjs","browser":"heapify.js","exports":{".":{"types":"./heapify.d.ts","import":"./heapify.mjs","require":"./heapify.js"}},"gitHead":"b28f2af589272d56928721fade919c19b3d1e4b4","scripts":{"loc":"cloc src/heapify.ts","lint":"eslint .","test":"vitest run --coverage","bench":"bash scripts/bench.sh","build":"npm run build:prod","clean":"rm -fr dist","watch":"vite build --watch","coverage":"vitest run --coverage","lint:fix":"eslint . --fix","build:dev":"npm run clean && vite build --mode development","loc:badge":"node scripts/generate-loc-badge.mjs","typecheck":"tsc --project tsconfig.check.json","build:prod":"npm run clean && vite build","integration":"npm run build:prod && vitest run --config vitest.integration.config.ts","bench:publish":"bash scripts/bench.sh --publish","version:badge":"node scripts/generate-version-badge.mjs","coverage:badge":"npm run coverage && node scripts/generate-coverage-badge.mjs"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:899ae5b2-8a9e-401e-89e7-1e7ee69470b6"}},"repository":{"url":"git://github.com/luciopaiva/heapify.git","type":"git"},"_npmVersion":"11.11.0","description":"Blazing fast priority queue","directories":{},"_nodeVersion":"22.22.0","_hasShrinkwrap":false,"devDependencies":{"cloc":"^2.5.1","vite":"^7.3.1","eslint":"^10.0.2","vitest":"^4.0.18","globals":"^17.4.0","@eslint/js":"^10.0.1","playwright":"^1.58.2","typescript":"^5.9.3","@types/node":"^22.19.13","vite-plugin-dts":"^4.5.4","typescript-eslint":"^8.56.1","@vitest/coverage-v8":"^4.0.18","@stylistic/eslint-plugin":"^5.9.0"},"_npmOperationalInternal":{"tmp":"tmp/heapify_1.0.0_1772646296833_0.6429724256754419","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"heapify","version":"1.0.1","keywords":["priority queue","queue","heap","minheap","maxheap","binary heap","heapsort"],"author":{"url":"https://luciopaiva.com","name":"Lucio Paiva"},"license":"MIT","_id":"heapify@1.0.1","maintainers":[{"name":"lucio","email":"luciopaiva@gmail.com"}],"homepage":"https://github.com/luciopaiva/heapify","bugs":{"url":"https://github.com/luciopaiva/heapify/issues"},"dist":{"shasum":"51ad8b96694e9328edf13073d0239f994428e45f","tarball":"https://registry.npmjs.org/heapify/-/heapify-1.0.1.tgz","fileCount":8,"integrity":"sha512-wWN6YYLeigPbkg3dXJs/Dpiiksr7P/q95iuLHngabgKfv2D91jMUHAMnsyOlWFSd5CcXhyrTh5rw4GV5i16mMg==","signatures":[{"sig":"MEYCIQDO33o/bxpzRghAvPBWlBQUq1aVMQnMoyqhzJdGaxaq2AIhAPcjuf5s0tUlfQV6wpYgjDZS0s/Jk/u2M5csIr1JJ/lS","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/heapify@1.0.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":37408},"main":"heapify.js","types":"heapify.d.ts","module":"heapify.mjs","browser":"heapify.js","exports":{".":{"types":"./heapify.d.ts","import":"./heapify.mjs","require":"./heapify.js"}},"gitHead":"f1dd31137775fcede4cc07bc3c41e24d3f4324aa","scripts":{"loc":"cloc src/heapify.ts","lint":"eslint .","test":"vitest run --coverage","bench":"bash scripts/bench.sh","build":"npm run build:prod","clean":"rm -fr dist","watch":"vite build --watch","coverage":"vitest run --coverage","lint:fix":"eslint . --fix","build:dev":"npm run clean && vite build --mode development","loc:badge":"node scripts/generate-loc-badge.mjs","typecheck":"tsc --project tsconfig.check.json","build:prod":"npm run clean && vite build","integration":"npm run build:prod && vitest run --config vitest.integration.config.ts","bench:publish":"bash scripts/bench.sh --publish","version:badge":"node scripts/generate-version-badge.mjs","coverage:badge":"npm run coverage && node scripts/generate-coverage-badge.mjs"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:899ae5b2-8a9e-401e-89e7-1e7ee69470b6"}},"repository":{"url":"git://github.com/luciopaiva/heapify.git","type":"git"},"_npmVersion":"11.11.0","description":"Blazing fast priority queue","directories":{},"_nodeVersion":"22.22.0","_hasShrinkwrap":false,"devDependencies":{"cloc":"^2.5.1","vite":"^7.3.1","eslint":"^10.0.2","vitest":"^4.0.18","globals":"^17.4.0","@eslint/js":"^10.0.1","playwright":"^1.58.2","typescript":"^5.9.3","@types/node":"^22.19.13","vite-plugin-dts":"^4.5.4","typescript-eslint":"^8.56.1","@vitest/coverage-v8":"^4.0.18","@stylistic/eslint-plugin":"^5.9.0"},"_npmOperationalInternal":{"tmp":"tmp/heapify_1.0.1_1772647619137_0.9773680137029459","host":"s3://npm-registry-packages-npm-production"}},"1.0.2":{"name":"heapify","version":"1.0.2","description":"Blazing fast priority queue","repository":{"type":"git","url":"git://github.com/luciopaiva/heapify.git"},"main":"heapify.js","browser":"heapify.js","module":"heapify.mjs","types":"heapify.d.ts","exports":{".":{"types":"./heapify.d.ts","import":"./heapify.mjs","require":"./heapify.js"}},"scripts":{"test":"vitest run --coverage","coverage":"vitest run --coverage","coverage:badge":"npm run coverage && node scripts/generate-coverage-badge.mjs","version:badge":"node scripts/generate-version-badge.mjs","loc":"cloc src/heapify.ts","loc:badge":"node scripts/generate-loc-badge.mjs","integration":"npm run build:prod && vitest run --config vitest.integration.config.ts","bench":"bash scripts/bench.sh","bench:publish":"bash scripts/bench.sh --publish","typecheck":"tsc --project tsconfig.check.json","lint":"eslint .","lint:fix":"eslint . --fix","clean":"rm -fr dist","build":"npm run build:prod","build:dev":"npm run clean && vite build --mode development","build:prod":"npm run clean && vite build","watch":"vite build --watch"},"keywords":["priority queue","queue","heap","minheap","maxheap","binary heap","heapsort"],"author":{"name":"Lucio Paiva","url":"https://luciopaiva.com"},"homepage":"https://github.com/luciopaiva/heapify","license":"MIT","devDependencies":{"@eslint/js":"^10.0.1","@stylistic/eslint-plugin":"^5.9.0","@types/node":"^22.19.13","@vitest/coverage-v8":"^4.0.18","cloc":"^2.5.1","eslint":"^10.0.2","globals":"^17.4.0","playwright":"^1.58.2","typescript":"^5.9.3","typescript-eslint":"^8.56.1","vite":"^7.3.1","vite-plugin-dts":"^4.5.4","vitest":"^4.0.18"},"gitHead":"7aca0c63de4dfe0efa67ad28a7192e04fe7a5334","_id":"heapify@1.0.2","bugs":{"url":"https://github.com/luciopaiva/heapify/issues"},"_nodeVersion":"22.22.0","_npmVersion":"11.11.0","dist":{"integrity":"sha512-h/b3y12Orh2VsISvDsF/vulkoKH38P7yr223hfWJILo3imy7dX8f9ZrBgkkfLsJG11g8GI1/y6+8POSxgR7YcQ==","shasum":"5a6ed524fe4b31d3582c0fae2b0ce760dc597e32","tarball":"https://registry.npmjs.org/heapify/-/heapify-1.0.2.tgz","fileCount":8,"unpackedSize":37408,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/heapify@1.0.2","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQDFloJoShF/s1p63O9UmhBBCVztbSXKKwVdJikCj9kJPAIhAP7ZiKF2h/dsKBZW63qVUNUjSrHnuWcfrW5zHca8C1a4"}]},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:90cbf440-7f64-4f22-a5f7-6539308e72c7"}},"directories":{},"maintainers":[{"name":"lucio","email":"luciopaiva@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/heapify_1.0.2_1772648066648_0.08196397944846656"},"_hasShrinkwrap":false}},"time":{"created":"2020-02-08T21:47:36.189Z","modified":"2026-03-04T18:14:27.080Z","0.1.0":"2020-02-08T21:47:36.309Z","0.2.0":"2020-03-11T01:17:51.822Z","0.2.1":"2020-03-11T01:20:35.918Z","0.3.0":"2020-07-27T23:42:08.681Z","0.4.0":"2020-09-21T00:45:55.442Z","0.4.1":"2021-12-28T01:51:33.607Z","0.5.0":"2021-12-28T12:27:43.292Z","0.6.0":"2022-01-15T11:08:05.595Z","1.0.0":"2026-03-04T17:44:57.029Z","1.0.1":"2026-03-04T18:06:59.300Z","1.0.2":"2026-03-04T18:14:26.798Z"},"bugs":{"url":"https://github.com/luciopaiva/heapify/issues"},"author":{"name":"Lucio Paiva","url":"https://luciopaiva.com"},"license":"MIT","homepage":"https://github.com/luciopaiva/heapify","keywords":["priority queue","queue","heap","minheap","maxheap","binary heap","heapsort"],"repository":{"type":"git","url":"git://github.com/luciopaiva/heapify.git"},"description":"Blazing fast priority queue","maintainers":[{"name":"lucio","email":"luciopaiva@gmail.com"}],"readme":"\n![Heapify](https://raw.githubusercontent.com/luciopaiva/heapify/master/logo.png)\n\n![coverage](badges/coverage.svg)\n![version](badges/version.svg)\n![lines of code](badges/loc.svg)\n\n🚑 🚴 🚌 🚕 🚗 🚚 🚛\n\nA very fast JavaScript priority queue, implemented using a binary heap, which in turn is implemented using two underlying parallel [typed arrays](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray). No dependencies whatsoever; just plain, vanilla JS.\n\n```js\nimport {MinQueue} from \"heapify\";\n// const {MinQueue} = require(\"heapify\");  // alternatively, require() also works\n\nconst queue = new MinQueue();\nqueue.push(1, 10);\nqueue.push(2, 5);\nqueue.pop();  // 2\nqueue.peek();  // 1\nqueue.clear();\nqueue.pop();  // undefined\n```\n\nIt's the fastest publicly available JavaScript library implementation of a priority queue. Here's a benchmark comparing Heapify to other popular libraries:\n\n<!-- BENCHMARK_TABLE_START -->\n| Operation            | Closure | FastPQ | FlatQueue | TinyQueue | Heapify |\n|----------------------|---------|--------|-----------|-----------|---------|\n| build                | 41      | 6      | -         | -         | 5       |\n| push                 | 66      | 13     | 18        | 26        | 9       |\n| pop                  | 286     | 60     | 58        | 327       | 48      |\n| push/pop batch       | 123     | 56     | 33        | 122       | 44      |\n| push/pop interleaved | 131     | 23     | 30        | 108       | 13      |\n| push/pop random      | 116     | 35     | 49        | 109       | 35      |\n\n_Generated from commit `97ff2c2` on 2026-03-04T11:46:43.158Z._\n<!-- BENCHMARK_TABLE_END -->\n\nSee the [benchmark](#benchmark) section for more details.\n\nHeapify's design strives for reliability, with strong test coverage and a focus on code readability. It should be easy to understand what the library is doing. The library is also very lean, with no dependencies and a small, concise codebase. \n\n# Table of contents\n\n- [Features](#features)\n- [How to install](#how-to-install)\n- [How to import](#how-to-import)\n- [API](#api)\n  - [constructor](#constructorcapacity--64-keys---priorities---keysbackingarraytype--uint32array-prioritiesbackingarraytype--uint32array)\n  - [capacity](#capacity)\n  - [clear()](#clear)\n  - [peek()](#peek)\n  - [peekPriority()](#peekpriority)\n  - [pop()](#pop)\n  - [push(key, priority)](#pushkey-priority)\n  - [size](#size)\n- [Benchmark](#benchmark)\n- [Contributing](#contributing)\n\n## Features\n\nSupported queue operations:\n\n- push: O(log n)\n- pop: O(log n) in the general case, O(1) if not preceded by a pop\n- peek: O(1) in the general case, O(log n) if preceded by a pop\n- peekPriority: O(1) in the general case, O(log n) if preceded by a pop\n- creation with pre-existing list of priorities: O(n)\n\nOther features:\n\n- runs on the browser and Node.js with ES5 and ES6 support\n- tiny code base (under 200 LoC)\n- no runtime dependencies\n- supports several types of priorities and keys\n\n## How to install\n\n```sh\nnpm i heapify\n```\n\nOr if you're a yarn person:\n\n```sh\nyarn add heapify\n```\n\n## How to import\n\n### Node.js\n\nYou can `import` it in your Node.js project using TypeScript:\n\n```js\nimport {MinQueue} from \"heapify\";\n```\n\nOr directly via [native ES6 module support](https://nodejs.org/api/esm.html), using the `mjs` ES6 module bundle:\n\n```js\nimport {MinQueue} from \"heapify/heapify.mjs\";\n```\n\nOr just `require()` it in your good old CommonJS project:\n\n```js\nconst {MinQueue} = require(\"heapify\");\n```\n\n### Browser\n\nHeapify can be included via regular script tags, where `Heapify` will be exposed globally:\n\n```html\n<script src=\"https://unpkg.com/heapify\"></script>\n<script>\n  const {MinQueue} = Heapify;\n</script>\n```\n\nThe example above uses [unpkg](https://unpkg.com), but you can of course reference a local copy installed either manually or via npm/yarn.\n\nFor projects using native ES6 modules, make sure to import the `mjs` ES6 module bundle instead:\n\n```js\nimport {MinQueue} from \"https://unpkg.com/heapify/heapify.mjs\"\n```\n\n## API\n\n### constructor(capacity = 64, keys = [], priorities = [], KeysBackingArrayType = Uint32Array, PrioritiesBackingArrayType = Uint32Array)\n\nCreates a new priority queue. Parameters are:\n\n- `capacity`: the size of the underlying typed arrays backing the heap;\n- `keys`: an optional array of pre-existing keys. Provide `[]` to skip this field;\n- `priorities`: an optional array of pre-existing priorities. Must match the number of keys above. Provide `[]` to skip this field;\n- `KeysBackingArrayType`: the array type to be used for keys;\n- `PrioritiesBackingArrayType`: the array type to be used for priorities.\n\nExample:\n\n```js\nconst queue1 = new MinQueue(32);\nconst queue2 = new MinQueue(16, [], [], Uint16Array, Uint32Array);\n```\n\n### capacity\n\nA read-only property that returns the maximum capacity of the queue. Example:\n\n```js\nconst queue = new MinQueue(32);\nqueue.capacity;  // 32\n```\n\n### clear()\n\nEffectively empties the queue. The heap capacity is not changed, nor are its elements erased in any way; it's just the variable that tracks the length that gets cleared to zero, so it's a very cheap operation.\n\nExample:\n\n```js\nconst queue = new MinQueue();\nqueue.push(1, 10);\nconsole.info(queue.size);  // 1\nqueue.clear();\nconsole.info(queue.size);  // 0\n```\n\n### peek()\n\nGets the key with the smallest priority, but does not remove it from the queue.\n\nExample:\n\n```js\nconst queue = new MinQueue();\nqueue.push(1, 10);\nqueue.peek();  // 1\n```\n\n### peekPriority()\n\nGets the _priority_ of the key with the smallest priority, but does not remove the item from the queue.\n\nExample:\n\n```js\nconst queue = new MinQueue();\nqueue.push(1, 10);\nqueue.peekPriority();  // 10\n```\n\n### pop()\n\nRemoves the smallest priority item from the queue, returning its key. Returns `undefined` if the queue is empty.\n\nNote that Heapify's heap implementation is not [stable](https://ece.uwaterloo.ca/~dwharder/aads/Projects/4/Stable_binary_heap/#:~:text=A%20heap%20is%20said%20to,were%20placed%20into%20the%20heap.). If multiple keys have the same priority, there are no guarantees about the order in which they will be popped.\n\nExample:\n\n```js\nconst queue = new MinQueue();\nqueue.push(1, 10);\nqueue.pop();  // 1\n```\n\n### push(key, priority)\n\nAdds a new item to the queue with a given `key` and `priority`. Throws an error if the queue is already at its capacity.\n\nExample:\n\n```js\nconst queue = new MinQueue();\nqueue.push(1, 10);\nqueue.size;  // 1\nqueue.peek();  // 1\nqueue.peekPriority();  // 10\n```\n\n### size\n\nA read-only property that returns the current size of the queue.\n\nExample:\n\n```js\nconst queue = new MinQueue();\nqueue.size;  // 0\nqueue.push(1, 10);\nqueue.size;  // 1\nqueue.pop();\nqueue.size;  // 0\n```\n\n## Benchmark\n\nOperations:\n\n- build - build a queue from scratch by providing a collection of keys and priorities, all at once;\n- push - insert a single element into the queue;\n- pop - remove a single element from the queue;\n- push/pop batch - performs batches of 1k pushes followed by 1k pops;\n- push/pop interleaved - starting with a partially filled queue, this test inserts a random element and then immediately removes the lowest priority value from the queue;\n- push/pop random - starting with a partially filled queue, this test runs either a push or a pop at random.\n\nEach test performs 1 million operations and is repeated 5 times. The median value is used as the result.\n\nTested libraries:\n\n- [Google Closure library](https://github.com/google/closure-library/blob/master/closure/goog/structs/heap.js) - a hugely popular library, but it is the worst implementation with respect to performance;\n- [Fast Priority Queue](https://github.com/lemire/FastPriorityQueue.js) - runs comparably fast, but doesn't support inserting keys either, so its implementation significantly limits what the user is able to achieve with it;\n- [FlatQueue](https://github.com/mourner/flatqueue) and [TinyQueue](https://github.com/mourner/tinyqueue) - two very nice queue implementations by Vladimir Agafonkin. They don't support the build method and that's why they're missing this benchmark. FlatQueue performs quite well for an implementation that is not based on typed arrays.\n\n## Contributing\n\nYou are welcome to contribute, but please take the time to read and follow [these guidelines](CONTRIBUTING.md).\n","readmeFilename":"README.md"}