{"_id":"negative-index","_rev":"8-fde8411423a8fd8e0de93ed806cc8d9c","name":"negative-index","description":"Convert negative index to positive starting from the end","dist-tags":{"latest":"2.0.0"},"versions":{"1.0.0":{"name":"negative-index","version":"1.0.0","description":"Convert negative index to positive starting from the end","main":"index.js","scripts":{"test":"node test"},"repository":{"type":"git","url":"git+https://github.com/dfcreative/negative-index.git"},"keywords":["normalize-offset","negative","index","slice","array","rotate","mod"],"author":{"name":"ΔY","email":"dfcreative@gmail.com"},"license":"MIT","bugs":{"url":"https://github.com/dfcreative/negative-index/issues"},"homepage":"https://github.com/dfcreative/negative-index#readme","gitHead":"85ba786a52eee407236b6f69d48e11f189a2979d","_id":"negative-index@1.0.0","_shasum":"f58c54aa787267e457f74b292a540a9ed3908069","_from":".","_npmVersion":"3.7.2","_nodeVersion":"6.2.0","_npmUser":{"name":"dfcreative","email":"df.creative@gmail.com"},"maintainers":[{"name":"dfcreative","email":"df.creative@gmail.com"}],"dist":{"shasum":"f58c54aa787267e457f74b292a540a9ed3908069","tarball":"https://registry.npmjs.org/negative-index/-/negative-index-1.0.0.tgz","integrity":"sha512-PzdJAMZ5Nh5OIUpFenyGKYbUpk+UktSav/NQEa8fe7OFPjiJHmW2QBiryZLAHF4YwSQvUFWzbePcQUflKacWlg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAH7LeNzkkroV5ANYyno056aLXfxYuySlahtKI3vl3NQAiEAsTKinvyoLS8swtoiXHPHMjdQAa7ul4O/FZMOevxqSsw="}]},"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/negative-index-1.0.0.tgz_1473968196043_0.051884132670238614"},"directories":{}},"1.0.1":{"name":"negative-index","version":"1.0.1","description":"Convert negative index to positive starting from the end","main":"index.js","scripts":{"test":"node test"},"repository":{"type":"git","url":"git+https://github.com/dfcreative/negative-index.git"},"keywords":["normalize-offset","negative","index","slice","array","rotate","mod"],"author":{"name":"ΔY","email":"dfcreative@gmail.com"},"license":"MIT","bugs":{"url":"https://github.com/dfcreative/negative-index/issues"},"homepage":"https://github.com/dfcreative/negative-index#readme","dependencies":{"is-negative-zero":"^2.0.0"},"gitHead":"6dc9bdb3004ec2dc8a2a6bff7ad97145fcd14964","_id":"negative-index@1.0.1","_shasum":"589beda2f83ab6264c3ee7123872158d567930a6","_from":".","_npmVersion":"3.7.2","_nodeVersion":"6.2.0","_npmUser":{"name":"dfcreative","email":"df.creative@gmail.com"},"maintainers":[{"name":"dfcreative","email":"df.creative@gmail.com"}],"dist":{"shasum":"589beda2f83ab6264c3ee7123872158d567930a6","tarball":"https://registry.npmjs.org/negative-index/-/negative-index-1.0.1.tgz","integrity":"sha512-WR2aNoP+D908prlpeIQQXu9zmgsKiov0NlP3OH5gPd6ouW3VtPHc4N2NzuxT6kNQNBmrJ9AJXpV8Z8VP3V0pUw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDICQ22IF4JZ996ppJJHAJDTa2AWw8hCRFMXb5QT+UBDgIhAPrvohTc764//KL+4Q/plsG9Ke9PkZq2mowW82bL2PmT"}]},"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/negative-index-1.0.1.tgz_1475617936590_0.8607616925146431"},"directories":{}},"1.0.2":{"name":"negative-index","version":"1.0.2","description":"Convert negative index to positive starting from the end","main":"index.js","scripts":{"test":"node test"},"repository":{"type":"git","url":"git+https://github.com/dfcreative/negative-index.git"},"keywords":["normalize-offset","negative","index","slice","array","rotate","mod"],"author":{"name":"ΔY","email":"dfcreative@gmail.com"},"license":"MIT","bugs":{"url":"https://github.com/dfcreative/negative-index/issues"},"homepage":"https://github.com/dfcreative/negative-index#readme","dependencies":{"is-negative-zero":"^2.0.0"},"gitHead":"f946cdcce48711e8ef1a7c06e14859cf356b5e6f","_id":"negative-index@1.0.2","_shasum":"bb0b349f9de80879326cfa54c56fb6b67ca4788d","_from":".","_npmVersion":"3.7.2","_nodeVersion":"6.2.0","_npmUser":{"name":"dfcreative","email":"df.creative@gmail.com"},"maintainers":[{"name":"dfcreative","email":"df.creative@gmail.com"}],"dist":{"shasum":"bb0b349f9de80879326cfa54c56fb6b67ca4788d","tarball":"https://registry.npmjs.org/negative-index/-/negative-index-1.0.2.tgz","integrity":"sha512-vE0tYCXpuve79YZBNQcheziORGD45Pl6OnCET5PcoLVtuWzHdobv8fY7byVQBgcEwBXk7wey/OYidneAEw6Ebw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIB1DA50b3gqWM/Ygd4Tfpb2J9e4mXxIxLNYYCBfjjK9wAiEA2b0H0AJgIJn+aYC8pveEcKsI+PL0XvyU7653Eeu1KEU="}]},"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/negative-index-1.0.2.tgz_1485512415333_0.7015709551051259"},"directories":{}},"1.0.3":{"name":"negative-index","version":"1.0.3","description":"Convert negative index to positive starting from the end","main":"index.js","scripts":{"test":"node test"},"repository":{"type":"git","url":"git+https://github.com/dy/negative-index.git"},"keywords":["normalize-offset","negative","index","slice","array","rotate","mod"],"author":{"name":"ΔY","email":"dfcreative@gmail.com"},"license":"MIT","bugs":{"url":"https://github.com/dy/negative-index/issues"},"homepage":"https://github.com/dy/negative-index#readme","dependencies":{"negative-zero":"^2.0.0"},"gitHead":"ee6ab6dc75bada8854aa9127078193816b8ddbc1","_id":"negative-index@1.0.3","_npmVersion":"6.4.1","_nodeVersion":"8.11.1","_npmUser":{"name":"dfcreative","email":"df.creative@gmail.com"},"dist":{"integrity":"sha512-SzyzUmUYmerjD9gOEqizFRcDakY+Cf/59rOfqMi4bT212PN6g+jkUOjr/Sx9oOUOxi7qf6dsRwE0PPeRIq4DRw==","shasum":"d5cd63255dedf1f7894e1513a8b9526c7af387af","tarball":"https://registry.npmjs.org/negative-index/-/negative-index-1.0.3.tgz","fileCount":4,"unpackedSize":1918,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJb00ciCRA9TVsSAnZWagAAr88P/jK1Tpt/wsC3ZuFJ3mcg\nOdYdmMFXEykSOzSH75Wy0E7E2pqS01zMTfqtoKTEgWm0iegoaNA3+5FaijXI\nPgYTb0iaNfGIR5thzeM3x2SZAFaM4RitzwSiA2WG0AnhaimPCQx3n6ZFO0zJ\nZ6zEDMX0z99Wq8J/MX2vKUPzWa31BaGL6da5N5E19HoK3rNvChKn0WyjHN+R\nfDDs0fx9yEDX/tcNF0d6iCTx62YdXP5bN67e89r0m5mufAlNmpyBL39dI1JP\nO8KAD8Yv0YcZsZhLUlqccDCTQs4TTH8lAp4k5DflUMo+Oxv+9Y3sq5AvD9HQ\n7xiwcVNuqblQP0M45xX9f2oBaX8OCixUyC0QATWXwm9kdtY4PlCP8ynOjXDf\nlKVVXdXqaT+S4MncaC6r/SlyIki2dhLynMAL1HOLuO7OVFQm7AzpdAD6rNJx\nDC6+hevHmIAYtrIZJY1YMwGKmzw6+55Ko2HJ+5u7ASWjfrhdnqiTxVJEzlMF\nux1VSff1VHeRGbbTcfPeyXBJ6KAjUuXXZEiz1bb48BAi+vvVcXEAQJl59e3D\n+oaLqBQd2D9ax2cqQNsB38mXMT01K22evkEaX1IJzbRbd8eXxfphnWqEfeX1\nL38yvbB7qcYzGTRGWTnh2CkcoETrBqvMOXa/YDTxUNBWnVCVA/55bNqyZ/e8\nphrq\r\n=hDPo\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIA+cGzMbopCfWJ0CCLdtHPl0LoAPU9YK6yWIXxbDfZr4AiA0zcJUO8wpOKhw6TcClQOPVkBfgPItm7GUkij6aeiRZA=="}]},"maintainers":[{"name":"dfcreative","email":"df.creative@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/negative-index_1.0.3_1540572961435_0.4971754788583944"},"_hasShrinkwrap":false},"2.0.0":{"name":"negative-index","version":"2.0.0","description":"Convert negative index to positive starting from the end","main":"index.js","type":"module","scripts":{"test":"node test"},"repository":{"type":"git","url":"git+https://github.com/dfcreative/negative-index.git"},"keywords":["normalize-offset","negative","index","slice","array","rotate","mod"],"author":{"name":"ΔY","email":"dfcreative@gmail.com"},"license":"MIT","bugs":{"url":"https://github.com/dfcreative/negative-index/issues"},"homepage":"https://github.com/dfcreative/negative-index#readme","gitHead":"68902d91571c6e5f1fc0773ec6757f6b544ef4ce","_id":"negative-index@2.0.0","_nodeVersion":"18.9.1","_npmVersion":"8.19.1","dist":{"integrity":"sha512-kvzrvbI69FPIhR3sDUiW0nxcGO2Us5j9597zHyy0G1d1pWabeadNw50tiXmeTAjTM4mkz4iL41uinJblnXUnnQ==","shasum":"7dbbe6f12d68c9c821a912573d06250f5d87f5dd","tarball":"https://registry.npmjs.org/negative-index/-/negative-index-2.0.0.tgz","fileCount":4,"unpackedSize":1908,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCr3ZzVKcJylOqS3aBvXuiMp+U0qCLuGQCTJtK896srpQIgQh8eSKcsGC2JttaX28qI6iAPW3F6Ca46wjTezhpDsUk="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjvDrtACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrgMA//W7aRFEFE1xBgBcCW24Iq1r9v1GNMGt4DeDRSRrVHZHCdT/pm\r\nn1KvfHJzON4IcpU4z2R14O/xONj5ugmoyXj2AED93rn5lWiMbHVHmqFROHxJ\r\nx4RZf7Ps/iBt4xWn8vPi9o9o25Q4PAkS+CAV4FM8dTtCb1Nsks1G3y8ltaOF\r\n9vPPGAzi1ofwoJ6D9MUBesiLVCZlmtmGzD8/0vs2Iw1roJDPf3uaO/tRkm5e\r\nfG0HQV21tZDRxVnq1p2lvMcBNXA8W+EjIlGBY8Hxi8NlUY4VC2VRGLuxSOCZ\r\niuNPuFgoDzIpw1mQM63HRTjrl/9BsBqzm0OHVOd4oXMGWvb60MzuGPiNW7uX\r\nohNDY49OVN09W8mhDQsyKpOgz2NEMj/udHLcfT/IJD0YKtBcushcSxz9EVOv\r\nTWS7Lje7pkN3U7hSo5qivgAhMZ++Xe2yaIZGR69NttrFQwleARbDEnVR3fQ3\r\naBoGZtWHGbix1Xq+TYnn9sTJRpL7dglAiqaznN0ucffIGfAo7Xcc7+ENyT2Y\r\n8ePnhwz9OJozDL/TEZ2BtvF/Q/x9k4odrL2LKJ45OEgxIdRxppHi7fjmb0r4\r\nmM1eS+7EgPciVJULzaKtIE5wef6hnLFe7OPdnNV5O+4IgwodVhy/qwWWopr0\r\n/jRdnbdIeFymaTtjpL+JSiz+EtE9nwsE+M4=\r\n=F354\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"dy","email":"df.creative@gmail.com"},"directories":{},"maintainers":[{"name":"dfcreative","email":"df.creative@gmail.com"},{"name":"dy","email":"df.creative@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/negative-index_2.0.0_1673280237335_0.9481082970327563"},"_hasShrinkwrap":false}},"readme":"Convert negative index to positive starting from the end. Same way [Array.slice](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/slice) arguments work.\n\n[![npm install negative-index](https://nodei.co/npm/negative-index.png?mini=true)](https://npmjs.org/package/negative-index/)\n\n```js\nimport idx from 'negative-index';\n\n// idx(index, length)\n\nidx(-5, 8); //3\nidx(5, 8); //5\n```\n\nWorks well for normalizing real numbers offset, like time etc:\n\n```js\nimport normOffset from 'negative-index';\n\nlet time = -.15, duration = 2.45;\n\nnormOffset(time, duration); //2.3\n```\n","maintainers":[{"name":"dfcreative","email":"df.creative@gmail.com"},{"name":"dy","email":"df.creative@gmail.com"}],"time":{"modified":"2023-01-09T16:03:57.603Z","created":"2016-09-15T19:36:38.032Z","1.0.0":"2016-09-15T19:36:38.032Z","1.0.1":"2016-10-04T21:52:18.537Z","1.0.2":"2017-01-27T10:20:15.984Z","1.0.3":"2018-10-26T16:56:01.589Z","2.0.0":"2023-01-09T16:03:57.512Z"},"homepage":"https://github.com/dfcreative/negative-index#readme","keywords":["normalize-offset","negative","index","slice","array","rotate","mod"],"repository":{"type":"git","url":"git+https://github.com/dfcreative/negative-index.git"},"author":{"name":"ΔY","email":"dfcreative@gmail.com"},"bugs":{"url":"https://github.com/dfcreative/negative-index/issues"},"license":"MIT","readmeFilename":"readme.md"}