{"_id":"@bramus/pagination-sequence","_rev":"11-82f978cd784c52530dbab14d67a62c94","name":"@bramus/pagination-sequence","dist-tags":{"latest":"1.2.1","beta":"1.1.2-beta.0"},"versions":{"1.0.0":{"name":"@bramus/pagination-sequence","version":"1.0.0","description":"Pagination Sequence Generator","type":"module","source":"src/index.js","module":"dist/index.js","scripts":{"build":"esbuild --bundle ./src/index.js --outfile=./dist/index.js --format=esm --sourcemap --minify","prepublish":"npm run build","test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/bramus/js-pagination-sequence.git"},"keywords":["pagination","sequence"],"author":{"name":"Bramus Van Damme","email":"bramus@bram.us","url":"https://www.bram.us/"},"license":"MIT","bugs":{"url":"https://github.com/bramus/js-pagination-sequence/issues"},"homepage":"https://github.com/bramus/js-pagination-sequence#readme","devDependencies":{"esbuild":"^0.14"},"dependencies":{"@bramus/range":"^1.0.1"},"gitHead":"c19196af8c7bea1b764b7b9ea021516e412b97e7","_id":"@bramus/pagination-sequence@1.0.0","_nodeVersion":"17.2.0","_npmVersion":"8.1.4","dist":{"integrity":"sha512-AHTfXko8GZSaQRk1cO5MkDl1GbwCVaovbCqEthuWWFPwgDX1VqaTiZHY/zEB2eg0B7ZZcF7DgEs4Gf3QBKtI6Q==","shasum":"d38d17f9b7ec5240b05771a0a97660aab9d8ce2d","tarball":"https://registry.npmjs.org/@bramus/pagination-sequence/-/pagination-sequence-1.0.0.tgz","fileCount":6,"unpackedSize":14110,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhrUWOCRA9TVsSAnZWagAAFIgP/jfZ7rZau4iNbQZlTLjE\nIzAD6mpUkBUMbvpGakYHaCz2knt85k5oF0P/ii3R8kVCQVTsgzFdxiFi1C2a\nwuzsD8Z+hu/wXlbmVmqUWsGzKG4HTM35m4f4SgLk307oWvKwnjl8wLhINMCJ\nkZiiecwMRdk86YmaudMRwwgkWwxFhxDPPHV0vjnyIIE8qPlr3Z8hcrRE78de\n44+KT8aoIIy2bniiWhl4YC4A74V21TE6wYmtk3E6QXN6ffsjDx2vqa1avstE\nygXFFH4jFYKR2DvXvBvUAT5kMOKI7WjXhUgFvcuZF5TiGXpXmO0UuMK2uL1C\nsBdOyVjmKwa/37z8U8/1b/eLI31E0l/QPmCNXhDdV4LGtCoJc1A5aOKH/d1P\ngX39bHjrL9VzX6b84B/O3k3NJYINmTcbbcuOFNLPNI7hU2lMBxOchhIhDLEz\np+9PLhHNVHRbPDwCpWsMn5uTt2qNWLSMlaDl8AHZdKLcNDbbHP2Z9i1oOZfR\nfLMwSkF4PPu4lOGHrXty4yuyCJPEcdjACMY/dj4NkP9KvOgfl8c5GIH7xiqe\nM0MW3YJyiw085gME0RpzAnDLy+lG+Fmm7pn4IrnAT144cVUV30AypgCGQQWP\n5yKJ0IEGruH8V9N4GxYQ6qaJqiluPJo53s4KQFBpMNOaty/qELdUbB0IYSdR\nj8iG\r\n=dLIk\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBf9zEiKDr18K++guaq5UoIaylCS31lHUvMoSETv/lbFAiBkFKwdmibbMaBOVMq6DyxKtwvm5Z7vATxw1mJIqcve7g=="}]},"_npmUser":{"name":"bramus","email":"bramus@bram.us"},"directories":{},"maintainers":[{"name":"bramus","email":"bramus@bram.us"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/pagination-sequence_1.0.0_1638745486147_0.14078071279347282"},"_hasShrinkwrap":false},"1.0.1":{"name":"@bramus/pagination-sequence","version":"1.0.1","description":"Pagination Sequence Generator","type":"module","source":"src/index.js","module":"dist/index.js","scripts":{"build":"esbuild --bundle ./src/index.js --outfile=./dist/index.js --format=esm --sourcemap --minify","prepublish":"npm run build","test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/bramus/js-pagination-sequence.git"},"keywords":["pagination","sequence"],"author":{"name":"Bramus Van Damme","email":"bramus@bram.us","url":"https://www.bram.us/"},"license":"MIT","bugs":{"url":"https://github.com/bramus/js-pagination-sequence/issues"},"homepage":"https://github.com/bramus/js-pagination-sequence#readme","devDependencies":{"esbuild":"^0.14"},"dependencies":{"@bramus/range":"^1.0.1"},"gitHead":"d35c9c9989c961b71d46d3a95da8d8a73c896bf3","_id":"@bramus/pagination-sequence@1.0.1","_nodeVersion":"17.2.0","_npmVersion":"8.1.4","dist":{"integrity":"sha512-YMuW5tkOyUjhDaiw19VgccY0ykIflGsvc6So/DL6WyJ13WhMxWhRSb0do29ocO0rPXvh59MpDRyVFh/yFAaDOw==","shasum":"1c857cd00064326b5710cb414ff2399d71286e38","tarball":"https://registry.npmjs.org/@bramus/pagination-sequence/-/pagination-sequence-1.0.1.tgz","fileCount":6,"unpackedSize":15657,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhrVIECRA9TVsSAnZWagAAZgYP/2MzPZ1+aQ+8hffwwBRz\nsXc2gL9JKAj0El5hW8fUdnpav+Mxhrdd82t1mos/LJwlNk/0i1SlNU/KzXul\n/ikVQpC8qbmCgpCJRsRB6sO1hCshpjSJx/IMCIN5d3E4+iYVGG78gpj9Usnq\nL55+2RAFmgXH89VjZDDtlPsFnm6vYp8DVbZ002rKFLi2tvhWRgPga8wwNzB5\nxXp4vpc5R07TnCV6Jc3qDkdOAQ2WH08yZ4mqxt+dcXAtRhJX/IkOIXz/0vt6\n5RFA2weSxzRQNE2pBYzVGaSoEeRpoIZJ+xlJZJBRgyUiKWGetT1zgcdRu3Ju\nTfX7YtbctDts73gXSqqHUe+x569NbFyewnZD/S13r4kUcULXWmjLef9Tvcp3\neOxXqVLNO+MGLFfY9NhKAht0dMy0+glhsdaBeDOWA5JrTj8GI9evI3qx1Te0\nbcS6dsPDyXQZc3qjvbTGFyrINTn88DMOdQLjzIE64OQIcd5FiQyE5i4YJU+7\n7ONfwvul/IX3zGYHVeBXh/LheZorqxx7MplhQS1P/t8ihjjTHg0DDwUIKybs\nLa0m1PvIdOtWyYTMxQFaU4iYCauwgpL/0iRNlCAq16LpuS+s6hTkqP/EiP7M\nijlbSuNDcE3xtWkZS4LJdlKJ5xm3RuFbYgIvkqIxDVm6a+W1AGcmWEFlt2ch\n/TsW\r\n=5L/z\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGo2dS3YsipUZwxAghHueBAwPh0LzwV+Wkm8zwWtNZZIAiEAkock0ju6YlyrTuYptSL+JVIIfdKbyz7vEKbLlShUFAQ="}]},"_npmUser":{"name":"bramus","email":"bramus@bram.us"},"directories":{},"maintainers":[{"name":"bramus","email":"bramus@bram.us"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/pagination-sequence_1.0.1_1638748676521_0.3713384656687979"},"_hasShrinkwrap":false},"1.0.2":{"name":"@bramus/pagination-sequence","version":"1.0.2","description":"Pagination Sequence Generator","type":"module","source":"src/index.js","module":"dist/index.js","scripts":{"build":"esbuild --bundle ./src/index.js --outfile=./dist/index.js --format=esm --sourcemap --minify","dev":"esbuild --bundle ./src/index.js --outfile=./dist/index.js --format=esm --watch","prepublish":"npm run build","test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/bramus/js-pagination-sequence.git"},"keywords":["pagination","sequence"],"author":{"name":"Bramus Van Damme","email":"bramus@bram.us","url":"https://www.bram.us/"},"license":"MIT","bugs":{"url":"https://github.com/bramus/js-pagination-sequence/issues"},"homepage":"https://github.com/bramus/js-pagination-sequence#readme","devDependencies":{"esbuild":"^0.14"},"dependencies":{"@bramus/range":"^1.0.1"},"gitHead":"8bb6adf8b7242fe2daaaa0dafde2069666fa2066","_id":"@bramus/pagination-sequence@1.0.2","_nodeVersion":"17.2.0","_npmVersion":"8.1.4","dist":{"integrity":"sha512-FQ6MfhRO+cogPU0nFv4FU5k3eRxcP++Hta/j0LdPVzntpx6nJ3ExQbzXMSmQn38qU34w9IixEREIWea2c6PUMQ==","shasum":"d713a8db4b05c2e56ad9b80b02dd44379f20f312","tarball":"https://registry.npmjs.org/@bramus/pagination-sequence/-/pagination-sequence-1.0.2.tgz","fileCount":6,"unpackedSize":16643,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhrdkQCRA9TVsSAnZWagAAFvMP/27Euu1w3SbYX9YNjdKl\nLlw20wAYvQ0SRvv7wYXdJ9i0cJrCqbR4Tt+7JoFlwU2gzt9OWoxRdNlbAT5B\nHhlIJy6xTuexIh8AyXyeVtCo/0ezWs6bKH3+8CObG3XNGyPzE98hsh87vYKi\nWttbkZaF9L0QedU3JZ7P93wqOP5qH3E6cy7Ehoxndac5tDzMe0Nr4tfbmm2b\noAvGsZGeUw4IeeFxQCR818eay5Oh4H71PZpuE1VPPvxls4GkM+A7x9b8JtBU\nrWW3xuik1FoWerkFQTPsQX/rWBMWrGMq0aVyOFdrMuo/XtXEUt7eASoPpoHW\nbmHHdrk2hsKlUUMDmqLhrHZg1c7EDzLqzM+VjGqqxx6xWViRWBIV5dhsot0R\nvseEYMm1XZ+OIvl0FkevTPaAXFldpeypFPpDUZhaCtw2DJMLHYAjZl1WNUrl\nMmfiFmvmqsuZlYwRKzkaUWupN4eiULNxy0q6RBNnPvUMcxdzQqMVVYc4e4xH\nsNtUkyaGo0CX9LK7wnAhwtVKPcZbY8ynQRiXxOm1VSVqmFaI0dvxTyjSg35Z\ngV+SmMiysmOBGHDaI4wo5+EWLMZoj4xI4ZYuDkQ3umS8RZ55P6oeKMhQeK2U\n69/QM+MvYdGOAqq13EfS6RqkioJGrISKljk9XiSW632UE7OUeKvGVxek9Zkj\nB9iz\r\n=Gf5E\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGEuqfJ3qpjpxR0S2d9C2EzeMswrHKaIeiqwZRs/us6MAiEA+43ML/nxXW/H7BTIwcuvsuKoRx+HIXvCZqR//9WdRuw="}]},"_npmUser":{"name":"bramus","email":"bramus@bram.us"},"directories":{},"maintainers":[{"name":"bramus","email":"bramus@bram.us"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/pagination-sequence_1.0.2_1638783248196_0.7128990854844022"},"_hasShrinkwrap":false},"1.0.3":{"name":"@bramus/pagination-sequence","version":"1.0.3","description":"Generate a sequence of numbers for use in a Pagination Component, the clever way.","type":"module","source":"src/index.js","module":"dist/index.js","scripts":{"build":"esbuild --bundle ./src/index.js --outfile=./dist/index.js --format=esm --sourcemap --minify","dev":"esbuild --bundle ./src/index.js --outfile=./dist/index.js --format=esm --watch","prepublish":"npm run build","test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/bramus/js-pagination-sequence.git"},"keywords":["pagination","sequence"],"author":{"name":"Bramus Van Damme","email":"bramus@bram.us","url":"https://www.bram.us/"},"license":"MIT","bugs":{"url":"https://github.com/bramus/js-pagination-sequence/issues"},"homepage":"https://github.com/bramus/js-pagination-sequence#readme","devDependencies":{"esbuild":"^0.14"},"dependencies":{"@bramus/range":"^1.0.1"},"gitHead":"da025195dcf842b09a2bb595e2a4aa5c5c6e8e05","_id":"@bramus/pagination-sequence@1.0.3","_nodeVersion":"17.2.0","_npmVersion":"8.1.4","dist":{"integrity":"sha512-v5pxEnn6qvvZGY0EgJPhcOQxq0k3TGftsoCZVipFc3j10cXjvj6cdJmbHM+tUE1B7mdnfa9ykqcVAv3LFmvPcg==","shasum":"ac5436c09566cce1f9d7f39398e35ddf3467ccda","tarball":"https://registry.npmjs.org/@bramus/pagination-sequence/-/pagination-sequence-1.0.3.tgz","fileCount":6,"unpackedSize":19223,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhrgRWCRA9TVsSAnZWagAAiVkQAKCmV39wfxKN2JYA9y8M\nvZ0O5o2+vPbqXbQeHXGC4yN5r/2rndnz68mIawjJb5nmAyc6EMSqRZSLhlsk\nmGhE1VLrCYkT41gGqa9cIE0z/6eOkHYl7Gp9VQok9VxtdqYOHqJULIXSbCMo\nCyQOz/imvTo/ZUndXmh+JGQpZfNFZ84o29nuQ4YZVMra/quNFJsBj47eKWn6\nuz+Pfj6pwwqHCyhXupFkb70X2zRhxM5NHJAxs48hIFz2M3aSLCA/7VgVGu6S\nYt6ENt5SaUsBGYz1bMwNljCmGAnk4OER9a2mRRZ3ZLGy91h9E+j1TY/q8PiD\ny9/Cuxj/kmEOsn8wCVBH4sSj8SNZSTVrAB664J5oEbgmVwG8rKZ6CZaGsouT\nLV4gRAXO3LNXf0d16P9fZ1pthFUbjGFsYGlRdsL9XUY3i/GjUDiyHjAYgItV\nC27ctS/BRpqV79wK4N/VMQCGOTMSiHzq2mLPBcD5Rg8IUIe0R3xq8diLj6b9\njD8Uy7n8iYzioOygFSNanrj8HM+s+8xugadPkkYqBQLPYm+P+io+8apDiS9z\ncTDYS0bWzVG8bDNDQsGpFLQJS6cYRd3SKOxjj32heEDwQOzutikYO/W4O+kB\nArpVLujSjGLgwAmhw2unA+xQcbAPMTQMzB6KstiLfwJiekiOEUkU7KcksZDN\n0LnR\r\n=x0WY\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHCtSLEVI4SNdQG2yWQcc1cr4StOt0NOvf48PzpkiGXIAiBEMGXBfXI5FM4dQ4CutWOTzvqzUfUU3L1XbLC9RJqCVw=="}]},"_npmUser":{"name":"bramus","email":"bramus@bram.us"},"directories":{},"maintainers":[{"name":"bramus","email":"bramus@bram.us"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/pagination-sequence_1.0.3_1638794326398_0.1391990714278073"},"_hasShrinkwrap":false},"1.0.4":{"name":"@bramus/pagination-sequence","version":"1.0.4","description":"Generate a sequence of numbers for use in a Pagination Component, the clever way.","type":"module","source":"src/index.js","module":"dist/index.js","scripts":{"build":"esbuild --bundle ./src/index.js --outfile=./dist/index.js --format=esm --sourcemap --minify","dev":"esbuild --bundle ./src/index.js --outfile=./dist/index.js --format=esm --watch","prepublish":"npm run build","test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/bramus/js-pagination-sequence.git"},"keywords":["pagination","sequence"],"author":{"name":"Bramus Van Damme","email":"bramus@bram.us","url":"https://www.bram.us/"},"license":"MIT","bugs":{"url":"https://github.com/bramus/js-pagination-sequence/issues"},"homepage":"https://github.com/bramus/js-pagination-sequence#readme","devDependencies":{"esbuild":"^0.14"},"dependencies":{"@bramus/range":"^1.0.1"},"gitHead":"be33beb9f1a863556dd9036d2bb707170361a97a","_id":"@bramus/pagination-sequence@1.0.4","_nodeVersion":"17.2.0","_npmVersion":"8.1.4","dist":{"integrity":"sha512-mfGFWADwyK7wkYPtSjb+E1qhkc5TWgaTexcSV0nBywTDQai9IRryLB4OwDPd+gkiv8P6c+5pTAxm+QcFHJf2UA==","shasum":"9949adfcb06efeec811503d718c4f8d98b26576f","tarball":"https://registry.npmjs.org/@bramus/pagination-sequence/-/pagination-sequence-1.0.4.tgz","fileCount":6,"unpackedSize":18051,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhrn+2CRA9TVsSAnZWagAAkJ8P/0k3IBMsmh74b1U+x3BQ\nKtAGFcDLpIM1lU/PD6B8WYq5Jn44sWBxmY5SwDG8YEDyZfYB/B2YZZN+PBZB\n4GXyk8f0vaxCgBqH8QKfp95XD+P58bSGoTt4wl52qLRoHXgXjrSlJNgtfKxd\nNDw6MMqmGwu/Zl0/pBSWqlRWsxAoZSxA2VyUpbpbCIr7QNLtkoAJr4+psLva\n289hhyUDQwrwh+H2ktimR3C3QdLs1GCMgzNWVB0ZMfuu5/kJedPgDjLozi6T\nzayHZNAtgUPhHeh2LWy3DS2sEUwrmKc2r7FWbAJRmUXCcQgOigRVLFBdAbIL\ngLUOPF95+sk25X71vWaPO2CjLu1nnkl4tpF5+rWZOWTIVOMmowjZx+Cc/s+r\nB42OWbd20Fpc45Fa+6IBs/WkJrEdkkrfHwN6mR/j2GHOm6OfuQUu4TExbJJ7\n0pIvPfZknt4yYv+e+pv7nAKT8wsZbFwr4LiL4RE6qhPcNYH8TNQsuvLDrSJZ\nE9GEuOm0hJ/W9Kt+5CeqVryp9h/uOzK1sA7kMcjs1Ds7iNfMl060Reb51koz\nCDXOwNwARMT2KPdqgiSw8bdv07c62Lt6K4fsLHEv4sEVJtFXRnTHSzfpPMYl\nz9NPpAboOOy7tOzmG6iYNdGk19AfDmTnLrqV3++2LM0w0RtgyMUKRLdVIwSO\nmYdX\r\n=5YPa\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDNQGBrIa3E7KwPClYEySHrS2vxcDOl0HaWsLLSR3KfbAiEApLa36/JVWzBdJAJzvemlUnHWWu1LwlFQdXlZlEWMYdc="}]},"_npmUser":{"name":"bramus","email":"bramus@bram.us"},"directories":{},"maintainers":[{"name":"bramus","email":"bramus@bram.us"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/pagination-sequence_1.0.4_1638825909926_0.735043930094448"},"_hasShrinkwrap":false},"1.1.0":{"name":"@bramus/pagination-sequence","version":"1.1.0","description":"Generate a sequence of numbers for use in a Pagination Component, the clever way.","type":"module","source":"src/index.js","module":"dist/index.js","main":"dist/index.js","scripts":{"build":"esbuild --bundle ./src/index.js --outfile=./dist/index.js --format=esm --sourcemap --minify","dev":"esbuild --bundle ./src/index.js --outfile=./dist/index.js --format=esm --watch","prepublish":"npm run build","pretest":"npm run build","test":"mocha"},"repository":{"type":"git","url":"git+https://github.com/bramus/js-pagination-sequence.git"},"keywords":["pagination","sequence"],"author":{"name":"Bramus Van Damme","email":"bramus@bram.us","url":"https://www.bram.us/"},"license":"MIT","bugs":{"url":"https://github.com/bramus/js-pagination-sequence/issues"},"homepage":"https://github.com/bramus/js-pagination-sequence#readme","devDependencies":{"esbuild":"^0.14.5","mocha":"^9.1.3"},"dependencies":{"@bramus/range":"^1.1.0"},"gitHead":"3e444474af6deb9fb30c0230146242600fe0c18e","_id":"@bramus/pagination-sequence@1.1.0","_nodeVersion":"17.2.0","_npmVersion":"8.1.4","dist":{"integrity":"sha512-5kED8KdtarPW0gJtzWPl40VL8ReMTenZagVjoXkviFXVyWM67neUq8GGKRYfMpcwgY7H4Yjr2S5pinYdVGXwxA==","shasum":"18f7416579c8e6fed224b5948c4c858ad71a6161","tarball":"https://registry.npmjs.org/@bramus/pagination-sequence/-/pagination-sequence-1.1.0.tgz","fileCount":6,"unpackedSize":21557,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhvLzMCRA9TVsSAnZWagAAoGUP/0zpMkM2XPTGbOk0j1Fd\nXyhxaQq4UuMOQhLyNkgh++K/I7yXx7YyIVUO4w/SdukIoHt4J50gWL79hHx9\nHvOGW1I/GQnwKOB8nI1JHk+DpqkIBYfFfBDZ+QbWGZgT3dHqF0tn8OAiIAf2\n+ijckgknM4L7lTfnWfevfy3d7s/ub7MfYAf+Re+9Wnf8h8kN1WR2Jb8Mx4OT\nQ6FnezpHCQxAtV8us0jQQAZn62BPWR3oTUDWg+Osp1x/M6KRFyJ4xGJ4hMXA\nuPge5r5CbnSMaxIv3l+ueOWFrPv9enH0BSj7d0AABSqqLWTKycTCVypHtrBB\nPH54iX0B3NrkAtem6fvutusCreE/UdM2ygBgYlTF1Mu62iluWrctVuh7sxjn\nsM1GkYkosV5pvinvqYA5tnJh5Wn9JAPTBrnv15iMW+irE73Y2PEev9tdQgAm\nDh/cwbIVNmHeMhMY43lyjwLU79jDpUNY6/QFJEKlZGzzj0QWiQRpDnmWDbDT\n/l10jrzuBak8+d7tCwsvesjde50nnDJ3D9py4RBjl4hwonW94vqIA78MRQ5y\nO0cN0nTY2XlUQJVXRyIys4q9n/Dg4mOPycQ7SK+2zgy1Ws59+PgHNH1dB23l\nMwU/y+DGe4AbPppkGzosCYA/04tpscvFn2OI+TwIaxGTd5WMNG1lk9SjcAtZ\n3w9v\r\n=mf8R\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCKzDHkrAC+Ls0gq9fo3XJU1/ayeiNuEoyLYR79PLmLsgIhAP84d1nMlTSNFR3e6wo8P1doJpdATJTktCcWEqZeR1jn"}]},"_npmUser":{"name":"bramus","email":"bramus@bram.us"},"directories":{},"maintainers":[{"name":"bramus","email":"bramus@bram.us"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/pagination-sequence_1.1.0_1639759052610_0.7904280234114931"},"_hasShrinkwrap":false},"1.1.1":{"name":"@bramus/pagination-sequence","version":"1.1.1","description":"Generate a sequence of numbers for use in a Pagination Component, the clever way.","type":"module","source":"src/index.js","module":"dist/index.js","main":"dist/index.js","scripts":{"build":"esbuild --bundle ./src/index.js --outfile=./dist/index.js --format=esm --sourcemap --minify","dev":"esbuild --bundle ./src/index.js --outfile=./dist/index.js --format=esm --watch","prepublish":"npm run build","pretest":"npm run build","test":"mocha"},"repository":{"type":"git","url":"git+https://github.com/bramus/js-pagination-sequence.git"},"keywords":["pagination","sequence"],"author":{"name":"Bramus Van Damme","email":"bramus@bram.us","url":"https://www.bram.us/"},"license":"MIT","bugs":{"url":"https://github.com/bramus/js-pagination-sequence/issues"},"homepage":"https://github.com/bramus/js-pagination-sequence#readme","devDependencies":{"esbuild":"^0.14.5","mocha":"^9.1.3"},"dependencies":{"@bramus/range":"^1.1.1"},"gitHead":"c6f7cd7fec8321e31d9cf1f3364506812b214a31","_id":"@bramus/pagination-sequence@1.1.1","_nodeVersion":"17.2.0","_npmVersion":"8.1.4","dist":{"integrity":"sha512-1iBtGvfAA5luEDZke3HoGSV8qwH9TsaLytict4zzK3EK6cE1Vx/puqjL36oi4SUIPjkXG+1cq5rk+6XHdB8vgQ==","shasum":"787576547b8448a4337b518bd08aba202d7a22bd","tarball":"https://registry.npmjs.org/@bramus/pagination-sequence/-/pagination-sequence-1.1.1.tgz","fileCount":6,"unpackedSize":22619,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhvMD3CRA9TVsSAnZWagAAgVsP/jlNizQ0K2OTabQwdzeD\nKoPzIjDCYmpz/TYzeIs64/WvG+MEY++VAKpA1pVZYKUEXRRtNFLlLXh+qzbK\nzJU3O42q+p4R/lLgf3+9FNEJVCdWkYCqmDYl/pP1O3MmC+qXt8MafV6JiUmq\n7u6t13yDq8HFeZ/dgwdqXbhThFIij4+AVziseLIVpc1vWtFkh9pl6wKrMM7u\n2dT5if6DOe1rRIY8mr9aIuWgB1A3bm5q0EY0Xdd+16l/kYc4xXd1Q1k1TOxp\n7p0Kw+D0bIu5ghcA2YQnmMCMAbCacIt0gMKmLv2xqZfKnY0A556qwLfWxjzV\nJ1jmcgVBVhf6fNXHBh1bCmJf2V9RSYjnpowGhiM7XhHsDhf5BHGcuK/FKo66\n/uWW6rz47M/f8OxbyAddO4a5oYw9kuZm6ROVzVfrnC+gaXq05mT9NJx4M58k\nPIjQdxvkjSh0Sgu1ynYGds4jP5KQhXExZmCln1frCqo69nncNZknkOOjGDfM\nDvw91vZtA59P3jsUrEICHBrp+J02CNDac1eOS+uaVfN8UNbpU6BAbflT1R7l\nM9dGtP+4d6erhllC1YGQt6kdRROtdMEn69ErlSsLXqwLTUnIHLLb7HhPylwR\nmJyugBHW2U0N5yGd72T4deOe+ZVnT9k8rdRknEgoRFBBfjaSuGff2x7SBunR\nR3ue\r\n=2kP7\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDAi62pj+MeMcoS2jH4SoXbqMBRSTZHZLSRhZRnjWvwYAiBTQGBneYsSciTIBQ9jh9kxU9Yo7PCLrvgnAU8U04GPZA=="}]},"_npmUser":{"name":"bramus","email":"bramus@bram.us"},"directories":{},"maintainers":[{"name":"bramus","email":"bramus@bram.us"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/pagination-sequence_1.1.1_1639760119676_0.9075302724501524"},"_hasShrinkwrap":false},"1.1.2-beta.0":{"name":"@bramus/pagination-sequence","version":"1.1.2-beta.0","description":"Generate a sequence of numbers for use in a Pagination Component, the clever way.","type":"module","main":"dist/index.cjs.js","module":"dist/index.esm.js","export":{".":"./dist/index.esm.js","import":"./dist/index.esm.js","require":"./dist/index.cjs.js"},"scripts":{"build-esm":"esbuild --bundle ./src/index.js --outfile=./dist/index.esm.js --format=esm --sourcemap --minify","build-cjs":"esbuild --bundle ./src/index.js --outfile=./dist/index.cjs.js --format=cjs --sourcemap --minify","build":"npm run build-esm && npm run build-cjs","prepublish":"npm run build","pretest":"npm run build","test":"mocha"},"repository":{"type":"git","url":"git+https://github.com/bramus/js-pagination-sequence.git"},"keywords":["pagination","sequence"],"author":{"name":"Bramus Van Damme","email":"bramus@bram.us","url":"https://www.bram.us/"},"license":"MIT","bugs":{"url":"https://github.com/bramus/js-pagination-sequence/issues"},"homepage":"https://github.com/bramus/js-pagination-sequence#readme","devDependencies":{"esbuild":"^0.14.5","mocha":"^9.1.3"},"dependencies":{"@bramus/range":"^1.1.2"},"readme":"[![JavaScript Pagination Sequence Generator](./screenshots/js-pagination-sequence.png)](https://codepen.io/bramus/pen/NWaxNKQ)\n\n# JavaScript Pagination Sequence Generator\n\nGenerate a sequence of numbers for use in a Pagination Component, the clever way.\n\n## Installation\n\n```bash\nnpm i @bramus/pagination-sequence\n```\n\n## Usage / Example\n\nThis library comes as an ES Module and exposes a function/algorithm to generate an array of pagination entries.\n\n```js\nimport { generate } from '@bramus/pagination-sequence';\n\nconst sequence = generate(67, 74);\n// ~> [1, 2, '…', 65, 66, 67, 68, 69, '…', 73, 74]\n```\n\nNote that this is a Framework Agnostic library: the generated array is not rendered in any way but, instead, must be fed into your own Pagination Component for rendering.\n\n💡 Looking for some Pagination Component inspiration? See [Integration Examples](#integration-examples) below to see how to use this with the JavaScript Framework Du Jour™.\n\n## API\n\nThe exposed function has the following API:\n\n```js\ngenerate(curPage, numPages, numPagesAtEdges = 2, numPagesAroundCurrent = 2, glue = '…');\n```\n\nParameters:\n\n- `curPage`: The current active page\n- `numPages`: The total number of pages\n- `numPagesAtEdges` _(default: 2)_: Number of pages to show on the outer edges.\n- `numPagesAroundCurrent` _(default: 2)_: Number of pages to show around the active page.\n- `glue` _(default: '…')_: The string to show when there's a gap\n\n## Principles\n\nThe algorithm is opinionated and follows these principles:\n\n- **Stable Output**\n\n  When generating a sequence, it will always generate the same amount of entries, for any `curPage` value. When viewing a page at the edge of a series, this can result in `numPagesAtEdges` being ignored.\n\n  For example: Instead of having `generate(2, 12, 1, 1)` return `01-[02]-03-..-12` _(5 entries)_, it will return `01-[02]-03-04-05-..-12` _(7 entries)_. This is a deliberate choice because `generate(7, 12, 1, 1)` will also return 7 entries: `01-..-06-[07]-08-..-12`.\n\n  With a stable amount of entries being generated, the output will also be visually stable when rendered on screen.\n\n- **Always include links to the edges**\n\n  The algorithm will always include links to the first and last page.\n\n  For Example: when looking at page 25 of 50, the algorithm will include a link to page 1 and page 50.\n\n- **No unnecessary gaps**\n\n  When the algorithm detects a gap that's only “1 item wide”, it will replace that gap with the actual number.\n\n  For Example: A foolish take on `generate(4, 9, 1, 1)`, would generate `01-..-03-[04]-05-..-09`. The algorithm corrects the first gap to `02` and will return `01-02-03-[04]-05-..-09` instead.\n\n## Integration Examples\n\n### React\n\n🔗 Try it online: [https://codepen.io/bramus/pen/NWaxNKQ](https://codepen.io/bramus/pen/NWaxNKQ)\n\n```jsx\nimport React from \"react\";\nimport ReactDOM from \"react-dom\";\nimport { generate } from \"@bramus/pagination-sequence\";\n\nconst BASE_URL = '#';\n\nconst PaginationEntry = ({ value, onEntryClick = null, label = null, title = null, isCurrent = false, isDisabled = false, ...props }) => {\n    label ??= value;\n    title ??= `Go to page ${value}`;\n\n    const onClick = (e) => {\n        e.stopPropagation();\n        e.preventDefault();\n        \n        e.target.blur();\n        \n        if (onEntryClick) {\n            onEntryClick(value);\n        }\n    }\n        \n    if (value == '…') {\n        return (\n            <li data-pagination-ellipsis {...props}><span>{label}</span></li>\n        );\n    }\n\n    if (isDisabled) {\n        return (\n            <li data-pagination-disabled {...props}><span>{label}</span></li>\n        );\n    }\n\n    if (isCurrent) {\n        props['data-pagination-current'] = true;\n    }\n\n    return (\n        <li {...props}>\n            <a href={`${BASE_URL}/page/${value}`} title={title} onClick={onClick}>{label}</a>\n        </li>\n    );\n}\n\nconst Pagination = ({ curPage, numPages, numPagesAtEdges = 2, numPagesAroundCurrent = 2, onEntryClick = null }) => {\n    const sequence = generate(curPage, numPages, numPagesAtEdges, numPagesAroundCurrent);\n    // console.log(sequence);\n\n    return (\n        <ul className=\"pagination\">\n            <PaginationEntry data-pagination-first onEntryClick={onEntryClick} value={1} title=\"Go to First Page\" label=\"&laquo;\" isDisabled={curPage === 1} />\n            <PaginationEntry data-pagination-prev onEntryClick={onEntryClick} value={curPage-1} title=\"Go to Previous Page\" label=\"&lsaquo;\" isDisabled={curPage === 1} />\n            {sequence.map((val, idx) => \n                <PaginationEntry key={`page-${(val == '…') ? `…-${idx}` : val}`} onEntryClick={onEntryClick} value={val} isCurrent={val == curPage} />\n            )}\n            <PaginationEntry data-pagination-next onEntryClick={onEntryClick} value={curPage+1} title=\"Go to Next Page\" label=\"&rsaquo;\" isDisabled={curPage === numPages} />\n            <PaginationEntry data-pagination-next onEntryClick={onEntryClick} value={numPages} title=\"Go to Last Page\" label=\"&raquo;\" isDisabled={curPage === numPages} />\n        </ul>\n    );\n}\n\nReactDOM.render(\n    <Pagination curPage={25} numPages={50} onEntryClick={(val) => { console.log(val)}} />,\n    document.getElementById('root')\n);\n```\n## License\n\n`@bramus/pagination-sequence` is released under the MIT public license. See the enclosed `LICENSE` for details.\n\n## Other Language Implementations\n\nLooking for an implementation in another programming language?\n\n- PHP: [https://gist.github.com/bramus/5d8f2e0269e57dff5136](https://gist.github.com/bramus/5d8f2e0269e57dff5136) _(The original, from 2014)_\n- _(submit a PR to add your own)_\n","readmeFilename":"README.md","gitHead":"44ff93c660c042b92c284b61da4c9452f4a26ecb","_id":"@bramus/pagination-sequence@1.1.2-beta.0","_nodeVersion":"17.2.0","_npmVersion":"8.1.4","dist":{"integrity":"sha512-BLNJApV1aKievqZeWrfmsrOLONysK4OgkYee6NixjqzQP4n7fudQJ0jRWMgTuBEXJR3KxNoS3sZEsAAMyMBieQ==","shasum":"4d513ffc963842520037b8707baa283165e38ed2","tarball":"https://registry.npmjs.org/@bramus/pagination-sequence/-/pagination-sequence-1.1.2-beta.0.tgz","fileCount":8,"unpackedSize":31981,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhvRdbCRA9TVsSAnZWagAAmPcP/08prWnfmhYiMMPHamVv\n71l+VsBRA39YZtbSf4p4oaudF7KTlMVUMElzsWasWpV9V06TqpJM47Y9pBmU\naZu7AX2z1VbmbTyD5v/SAu5eFBVPVpR0FZ+uNziaD5m/QxtdareEYJXw64IE\nqmdurln1yy63G61w2NsCBjbMbJ9ePI5dWyNzqThigxyVCFeOBkRVL2NztOVi\ndm3A2e56283fVxF2wKug4mnvCSPK9XQOOogw8E5y6T19Mx+VzZ4Tls5Hp0Qe\ny6DJvs4UXHY/cgSxQ3daBYpxSbphMN8/xKA8P4vwtHU1/gzeA5rj2iHHxnH2\n7+94dCM8s4756oB/q7gd4di3LSGKmKlihd7K7OyS+UtbMQZOMH318ZAVx/F/\nWcbh+Y3Ao0DIL9LRtESNGYRzXTLvfaQGtxQsojTTdchSSnn9/Gl49MErbXTy\nraTjVdbLlp9lbnL8NUShPn0c4cQ1g6VyhFYz+U1Poob0BPy5JqQkPymKFkHV\nUo8lI7M8HuJ4iKrlHC7lBBhblnGgj6OxVN8+3WCuNTbJ3KGnFvJsen5JbQUa\nt/PYD26W2bOHcksraeBDAVuSR8MX/sLWL//6XaY0zC/Zijw9yFW2kTDaftdH\nxs4NgKa5M71UkpiZPNwvHfjqw9IT+m6U/CVj0/OGwePQ6tphIRgY6fsMo6g9\nNc3E\r\n=frG3\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDPezaaSptDY9S4OS1P7RVsqMGXpaSF6n0lXNQqgCW3iAIhAM/Pkbo0LWN5V3usO++fs0yEh1gcJzK4gvx8yFf+MGui"}]},"_npmUser":{"name":"bramus","email":"bramus@bram.us"},"directories":{},"maintainers":[{"name":"bramus","email":"bramus@bram.us"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/pagination-sequence_1.1.2-beta.0_1639782235382_0.3153739219507725"},"_hasShrinkwrap":false},"1.1.2":{"name":"@bramus/pagination-sequence","version":"1.1.2","description":"Generate a sequence of numbers for use in a Pagination Component, the clever way.","type":"module","main":"dist/index.cjs.js","module":"dist/index.esm.js","export":{".":"./dist/index.esm.js","import":"./dist/index.esm.js","require":"./dist/index.cjs.js"},"scripts":{"build-esm":"esbuild --bundle ./src/index.js --outfile=./dist/index.esm.js --format=esm --sourcemap --minify","build-cjs":"esbuild --bundle ./src/index.js --outfile=./dist/index.cjs.js --format=cjs --sourcemap --minify","build":"npm run build-esm && npm run build-cjs","prepublish":"npm run build","pretest":"npm run build","test":"mocha"},"repository":{"type":"git","url":"git+https://github.com/bramus/js-pagination-sequence.git"},"keywords":["pagination","sequence"],"author":{"name":"Bramus Van Damme","email":"bramus@bram.us","url":"https://www.bram.us/"},"license":"MIT","bugs":{"url":"https://github.com/bramus/js-pagination-sequence/issues"},"homepage":"https://github.com/bramus/js-pagination-sequence#readme","devDependencies":{"esbuild":"^0.14.5","mocha":"^9.1.3"},"dependencies":{"@bramus/range":"^1.1.2"},"gitHead":"692d0063f83f813f385c553b901d0b013598c060","_id":"@bramus/pagination-sequence@1.1.2","_nodeVersion":"17.2.0","_npmVersion":"8.1.4","dist":{"integrity":"sha512-I4Yi8H/9RPpr4LfjeHZNRUTBah8ktzjmmO2UerLPQhQmABbXUIYARXj2uX6xclMk/t9io15Cr0MpAjtGTc+8iw==","shasum":"95e9c6473c8e4d52926f8785756ff829a9b1b461","tarball":"https://registry.npmjs.org/@bramus/pagination-sequence/-/pagination-sequence-1.1.2.tgz","fileCount":8,"unpackedSize":31974,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhvRhQCRA9TVsSAnZWagAACl0QAJScfa7IEOxSdYB2rSbx\nBy1BbO7L6UWIyyPzd3/p9ALrCu9TNP9qW+25aRgNU1qtBskQ6nBIFe3QbJFa\nrIXe4D/bNf7CTJ5WtgBKiQfHKZMiVJXgQVDwfKFdg9TKAcJ46vE5QtKdSn4h\nFcKTlizJRrUdIfaJQuBFxcWPwH0T98x1jtDo+o/8lAeHPTSeyNT8Aj9+Ovuc\nzFTw68MS511KC49LnquFmMIIMFmTtDSGYU8QPZ2EvuNh6QQVO9PrwZ41tpD7\nXF5cPTZ5PZBiAJKj/Vxm0Ulvhe71Q4ZBPoWy/SxS+cfNxoYOR+7Kt6MuCWHE\nP8tdiWfuOmMVtzqpmhbDbygBtQGLSk3w2JDxjgAB7bil4siSaM/PVOFvETls\nE+kjgO4PUxLpeu/0FrdsIIE8vFi1iGP1eXZW2xlgjQvdCBesgYzVNrEjqjOR\nnleq3TWopKPYf8It4NYS9xPPVAh9n9nkQOBdp8/gMMSR88MkWPIYDBNDz5J9\nJGu9jdvykastld+Wpm7RPe/48DZSOzDsGIRxkozedMnewmcEYCWIQgUHc+Dr\nrcBVuiNs6BiuupPf+aPZcdpUIFwyszcqcvIOb2BP9Z9jKwqLgop9qt9mSVLW\nIQekPikck/vAIZZ4miWJKzpp/xV7gAxDhk9l4tyxbgjabyojT4hnK6y1Rsn0\nObrw\r\n=4yoA\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDPc7iSimuxPTwT+xn8TFfQlrmHQcm4Q1uYjXCTvMrKrAiB5XjjhfT2w7AtL7RHRj5W7Pe2r4CrjXAAmVPMz5vzCBQ=="}]},"_npmUser":{"name":"bramus","email":"bramus@bram.us"},"directories":{},"maintainers":[{"name":"bramus","email":"bramus@bram.us"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/pagination-sequence_1.1.2_1639782480487_0.6045164653254977"},"_hasShrinkwrap":false},"1.2.0":{"name":"@bramus/pagination-sequence","version":"1.2.0","description":"Generate a sequence of numbers for use in a Pagination Component, the clever way.","type":"module","main":"dist/index.cjs.js","module":"dist/index.esm.js","export":{".":"./dist/index.esm.js","import":"./dist/index.esm.js","require":"./dist/index.cjs.js"},"scripts":{"build-esm":"esbuild --bundle ./src/index.js --outfile=./dist/index.esm.js --format=esm --sourcemap --minify","build-cjs":"esbuild --bundle ./src/index.js --outfile=./dist/index.cjs.js --format=cjs --sourcemap --minify","build":"npm run build-esm && npm run build-cjs","prepublish":"npm run build","pretest":"npm run build","test":"mocha"},"repository":{"type":"git","url":"git+https://github.com/bramus/js-pagination-sequence.git"},"keywords":["pagination","sequence"],"author":{"name":"Bramus Van Damme","email":"bramus@bram.us","url":"https://www.bram.us/"},"license":"MIT","bugs":{"url":"https://github.com/bramus/js-pagination-sequence/issues"},"homepage":"https://github.com/bramus/js-pagination-sequence#readme","devDependencies":{"esbuild":"^0.14.5","mocha":"^9.1.3"},"dependencies":{"@bramus/range":"^1.1.2"},"gitHead":"fbd917efbee3661227c4634b62ff1e1b1500a68b","_id":"@bramus/pagination-sequence@1.2.0","_nodeVersion":"17.2.0","_npmVersion":"8.1.4","dist":{"integrity":"sha512-CtXEPvGEABRQkR/Lp251T8CTv6zAwrU6yzhF+2BjzV6KjCW6SR3y7GPqOQFTEo3/x5pgbeZiSKhz74xgTCx33A==","shasum":"42d14b093f7a3d64444733366a2ce113d889ca1a","tarball":"https://registry.npmjs.org/@bramus/pagination-sequence/-/pagination-sequence-1.2.0.tgz","fileCount":8,"unpackedSize":34288,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiEmSRACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoNfhAAkQr3BX2XHpzjj6NFQhjNnkgVO1Ey5bp1Zdr8Zrg6QcMKsLlR\r\nZzXQQU3sBtCxxDLjLpDzecPvjiSEHYiyqNaMXmATLRXAB4sQ6Su1caviSaVh\r\n8THhLLLY1ZV8cAWrVLP9/0xfYn3wUKsoR5xLb+OOu3EIFLesL6eDEYJRJG4G\r\nw1612E1hsdnJOOprsw/uu8t/x+2/ITNWL980dYgFsj5xPaxkQgjzR2CM0U9+\r\njv2MQGWs7/F6be6Zy8UYrgH9drmKl7rx6poXYjJnaDZn3cnuKSC/I5cS2blQ\r\npSwuRuXOaTx61qdV58sb6fYhxM8YVwz9O9KyELZzzy9i/MrwHcAMw1CRAeFV\r\n8TSsQSY0MSRXzbjfjkmek/1OZSu258oSAfPZCOiV4n9Z1RIO79mWEwvjmmYT\r\nnCd3e7B3MQIBuJLQk/j51NFKoF+IBdRFZf3qj8WNliVSOiHTdFAYO98azQjn\r\nNfBEAHx8oR+Ux73iu1/PGrjWXo5V0ap1pDqPcFgG0D7pxhJYQCn8KtTv6GTK\r\nd2/DXGooq3MVE1xwS6dkizOUmbGUNO8wkdiZgGdnE1glmKRpTeKgwxSwkvw/\r\nPRHeB0vnHMNLog6H7ycMU1BgPxtGtsYGM38cB/Dd83pLQlj1OYl2Cz9svWax\r\nbVpodDvF0k4LNk3yGD8uO9ETnJ5UhQCXnrw=\r\n=7QR7\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCID+xWRzIb8zBRVyJy7YWZOYYmhNOfdWHWhhC66jD0s/3AiEA23ZCJwj82lF9lgn8xC91W2yrtrBoNrK8xo4RlI/tEpg="}]},"_npmUser":{"name":"bramus","email":"bramus@bram.us"},"directories":{},"maintainers":[{"name":"bramus","email":"bramus@bram.us"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/pagination-sequence_1.2.0_1645372561181_0.06691745331146493"},"_hasShrinkwrap":false},"1.2.1":{"name":"@bramus/pagination-sequence","version":"1.2.1","description":"Generate a sequence of numbers for use in a Pagination Component, the clever way.","type":"module","main":"dist/index.cjs","module":"dist/index.esm.js","exports":{".":{"require":"./dist/index.cjs","default":"./dist/index.esm.js"}},"scripts":{"build-esm":"esbuild --bundle ./src/index.js --outfile=./dist/index.esm.js --format=esm --sourcemap --minify","build-cjs":"esbuild --bundle ./src/index.js --outfile=./dist/index.cjs --format=cjs --sourcemap --minify","build":"npm run build-esm && npm run build-cjs","prepublish":"npm run build","pretest":"npm run build","test":"mocha"},"repository":{"type":"git","url":"git+https://github.com/bramus/js-pagination-sequence.git"},"keywords":["pagination","sequence"],"author":{"name":"Bramus Van Damme","email":"bramus@bram.us","url":"https://www.bram.us/"},"license":"MIT","bugs":{"url":"https://github.com/bramus/js-pagination-sequence/issues"},"homepage":"https://github.com/bramus/js-pagination-sequence#readme","devDependencies":{"esbuild":"^0.14.5","mocha":"^9.1.3"},"dependencies":{"@bramus/range":"^1.1.2"},"gitHead":"6ed880c250e50319bea334dd2df518db8b2252c6","_id":"@bramus/pagination-sequence@1.2.1","_nodeVersion":"18.12.1","_npmVersion":"8.19.2","dist":{"integrity":"sha512-cdyxskW2CTvCtAYMSvuNQDhONds5mH9E6Eavcvbslmk8BRMQPFB5FAZkBxM3EOK/3B/nqb8O0DFVKscpxyvxfw==","shasum":"4fe7bd6b0537b4ecba0fb7c9d21290df65bbfef2","tarball":"https://registry.npmjs.org/@bramus/pagination-sequence/-/pagination-sequence-1.2.1.tgz","fileCount":8,"unpackedSize":34267,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHpTXlxCdgHStJ5bsbEzFnABeTwlfDO3hwgT/7nyLQ3oAiEAtxGA+XC1iUYFY0P0Fny1gJwYK2cLKsFiz7l2UDeIZNg="}]},"_npmUser":{"name":"bramus","email":"bramus@bram.us"},"directories":{},"maintainers":[{"name":"bramus","email":"bramus@bram.us"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/pagination-sequence_1.2.1_1689710993364_0.0943386238584738"},"_hasShrinkwrap":false}},"time":{"created":"2021-12-05T23:04:46.108Z","1.0.0":"2021-12-05T23:04:46.278Z","modified":"2023-07-18T20:09:53.762Z","1.0.1":"2021-12-05T23:57:56.654Z","1.0.2":"2021-12-06T09:34:08.320Z","1.0.3":"2021-12-06T12:38:46.547Z","1.0.4":"2021-12-06T21:25:10.147Z","1.1.0":"2021-12-17T16:37:32.823Z","1.1.1":"2021-12-17T16:55:19.834Z","1.1.2-beta.0":"2021-12-17T23:03:55.659Z","1.1.2":"2021-12-17T23:08:00.605Z","1.2.0":"2022-02-20T15:56:01.337Z","1.2.1":"2023-07-18T20:09:53.583Z"},"maintainers":[{"name":"bramus","email":"bramus@bram.us"}],"description":"Generate a sequence of numbers for use in a Pagination Component, the clever way.","homepage":"https://github.com/bramus/js-pagination-sequence#readme","keywords":["pagination","sequence"],"repository":{"type":"git","url":"git+https://github.com/bramus/js-pagination-sequence.git"},"author":{"name":"Bramus Van Damme","email":"bramus@bram.us","url":"https://www.bram.us/"},"bugs":{"url":"https://github.com/bramus/js-pagination-sequence/issues"},"license":"MIT","readme":"[![JavaScript Pagination Sequence Generator](./screenshots/js-pagination-sequence.png)](https://codepen.io/bramus/pen/NWaxNKQ)\n\n# JavaScript Pagination Sequence Generator\n\nGenerate a sequence of numbers for use in a Pagination Component, the clever way.\n\n## Installation\n\n```bash\nnpm i @bramus/pagination-sequence\n```\n\n## Usage / Example\n\nThis library comes as an ES Module and exposes a function/algorithm to generate an array of pagination entries.\n\n```js\nimport { generate } from '@bramus/pagination-sequence';\n\nconst sequence = generate(67, 74);\n// ~> [1, 2, '…', 65, 66, 67, 68, 69, '…', 73, 74]\n```\n\nAlternatively you can use `generateFromObj` which accepts a configuration Object as an argument:\n\n```js\nimport { generateFromObj } from '@bramus/pagination-sequence';\n\nconst sequence = generateFromObj({\n    curPage: 67,\n    numPages: 74,\n});\n// ~> [1, 2, '…', 65, 66, 67, 68, 69, '…', 73, 74]\n```\n\nNote that this is a Framework Agnostic library: the generated array is not rendered in any way but, instead, must be fed into your own Pagination Component for rendering.\n\n💡 Looking for some Pagination Component inspiration? See [Integration Examples](#integration-examples) below to see how to use this with the JavaScript Framework Du Jour™.\n\n## API\n\n### `generate()`\n\nThe exposed `generate` function has the following API:\n\n```js\ngenerate(curPage, numPages, numPagesAtEdges = 2, numPagesAroundCurrent = 2, glue = '…');\n```\n\nParameters:\n\n- `curPage`: The current active page\n- `numPages`: The total number of pages\n- `numPagesAtEdges` _(default: 2)_: Number of pages to show on the outer edges.\n- `numPagesAroundCurrent` _(default: 2)_: Number of pages to show around the active page.\n- `glue` _(default: '…')_: The string to show when there's a gap\n\n### `generateFromObj()`\n\nThe `generateFromObj` function accepts one single `opts` object. Its members are all of the parameters described above. Default values are set where possible.\n\n```js\nconst { \n    curPage = 1,\n    numPages = 1,\n    numPagesAtEdges = 2,\n    numPagesAroundCurrent = 2,\n    glue = '…',\n} = opts;\n```\n\n## Principles\n\nThe algorithm is opinionated and follows these principles:\n\n- **Stable Output**\n\n  When generating a sequence, it will always generate the same amount of entries, for any `curPage` value. When viewing a page at the edge of a series, this can result in `numPagesAtEdges` being ignored.\n\n  For example: Instead of having `generate(2, 12, 1, 1)` return `01-[02]-03-..-12` _(5 entries)_, it will return `01-[02]-03-04-05-..-12` _(7 entries)_. This is a deliberate choice because `generate(7, 12, 1, 1)` will also return 7 entries: `01-..-06-[07]-08-..-12`.\n\n  With a stable amount of entries being generated, the output will also be visually stable when rendered on screen.\n\n- **Always include links to the edges**\n\n  The algorithm will always include links to the first and last page.\n\n  For Example: when looking at page 25 of 50, the algorithm will include a link to page 1 and page 50.\n\n- **No unnecessary gaps**\n\n  When the algorithm detects a gap that's only “1 item wide”, it will replace that gap with the actual number.\n\n  For Example: A foolish take on `generate(4, 9, 1, 1)`, would generate `01-..-03-[04]-05-..-09`. The algorithm corrects the first gap to `02` and will return `01-02-03-[04]-05-..-09` instead.\n\n## Integration Examples\n\n### React\n\n🔗 Try it online: [https://codepen.io/bramus/pen/NWaxNKQ](https://codepen.io/bramus/pen/NWaxNKQ)\n\n```jsx\nimport React from \"react\";\nimport ReactDOM from \"react-dom\";\nimport { generate } from \"@bramus/pagination-sequence\";\n\nconst BASE_URL = '#';\n\nconst PaginationEntry = ({ value, onEntryClick = null, label = null, title = null, isCurrent = false, isDisabled = false, ...props }) => {\n    label ??= value;\n    title ??= `Go to page ${value}`;\n\n    const onClick = (e) => {\n        e.stopPropagation();\n        e.preventDefault();\n        \n        e.target.blur();\n        \n        if (onEntryClick) {\n            onEntryClick(value);\n        }\n    }\n        \n    if (value == '…') {\n        return (\n            <li data-pagination-ellipsis {...props}><span>{label}</span></li>\n        );\n    }\n\n    if (isDisabled) {\n        return (\n            <li data-pagination-disabled {...props}><span>{label}</span></li>\n        );\n    }\n\n    if (isCurrent) {\n        props['data-pagination-current'] = true;\n    }\n\n    return (\n        <li {...props}>\n            <a href={`${BASE_URL}/page/${value}`} title={title} onClick={onClick}>{label}</a>\n        </li>\n    );\n}\n\nconst Pagination = ({ curPage, numPages, numPagesAtEdges = 2, numPagesAroundCurrent = 2, onEntryClick = null }) => {\n    const sequence = generate(curPage, numPages, numPagesAtEdges, numPagesAroundCurrent);\n    // console.log(sequence);\n\n    return (\n        <ul className=\"pagination\">\n            <PaginationEntry data-pagination-first onEntryClick={onEntryClick} value={1} title=\"Go to First Page\" label=\"&laquo;\" isDisabled={curPage === 1} />\n            <PaginationEntry data-pagination-prev onEntryClick={onEntryClick} value={curPage-1} title=\"Go to Previous Page\" label=\"&lsaquo;\" isDisabled={curPage === 1} />\n            {sequence.map((val, idx) => \n                <PaginationEntry key={`page-${(val == '…') ? `…-${idx}` : val}`} onEntryClick={onEntryClick} value={val} isCurrent={val == curPage} />\n            )}\n            <PaginationEntry data-pagination-next onEntryClick={onEntryClick} value={curPage+1} title=\"Go to Next Page\" label=\"&rsaquo;\" isDisabled={curPage === numPages} />\n            <PaginationEntry data-pagination-next onEntryClick={onEntryClick} value={numPages} title=\"Go to Last Page\" label=\"&raquo;\" isDisabled={curPage === numPages} />\n        </ul>\n    );\n}\n\nReactDOM.render(\n    <Pagination curPage={25} numPages={50} onEntryClick={(val) => { console.log(val)}} />,\n    document.getElementById('root')\n);\n```\n## License\n\n`@bramus/pagination-sequence` is released under the MIT public license. See the enclosed `LICENSE` for details.\n\n## Other Language Implementations\n\nLooking for an implementation in another programming language?\n\n- PHP: [https://gist.github.com/bramus/5d8f2e0269e57dff5136](https://gist.github.com/bramus/5d8f2e0269e57dff5136) _(The original, from 2014)_\n- _(submit a PR to add your own)_\n","readmeFilename":"README.md"}