{"_id":"@bucky24/toolbox","_rev":"7-73f032eb3781175e6ed86eafe6aeb6b9","name":"@bucky24/toolbox","dist-tags":{"latest":"0.5.1"},"versions":{"0.1.0":{"name":"@bucky24/toolbox","version":"0.1.0","author":{"name":"bucky24"},"license":"ISC","_id":"@bucky24/toolbox@0.1.0","maintainers":[{"name":"bucky24","email":"rwijtman@gmail.com"}],"homepage":"https://gitlab.com/bucky24/toolbox#readme","bugs":{"url":"https://gitlab.com/bucky24/toolbox/issues"},"dist":{"shasum":"9028e11179d6170c1903639a00f15d44cd732a1c","tarball":"https://registry.npmjs.org/@bucky24/toolbox/-/toolbox-0.1.0.tgz","fileCount":4,"integrity":"sha512-pFuk5VjEzBJRQw5hRNVE/XezGSv/6azQTBPzUttIpCNN9i8nPVq0L2yFsgzQlssjVZkrMo2oK+r1GaGjOO1AAA==","signatures":[{"sig":"MEUCIQCzYjr2XYUADSCj67NCIf3yKYxMbcp63Phl8g/ycIYzIgIgeeGLWUUuR4SclndXRavrietKFd2mUWe8Of7iRW4pRec=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3780,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiy1QVACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmq7KRAAg6ZydjsW+3t/qJQzMGuoD492gA+KDgHT5kb4juXfbVYXllBP\r\nDohSESA6lgeBh82a7dHp62rXKNI36BqqrOdetz6LBVPo44gmDXSLa4CuYHfs\r\nQL63KTvq0bZI+famB47HH/im6+vVPcC+gx2vcfX+Jox0b2trH+EZ487VkFOy\r\n41xf6noY0xknzdhSiY+Wb7J8JKpTHasY1/y8YPXRQRLFmbTIx0hmz2n/V3Z3\r\nJUymS+DhX13S5tlGcc0IY6YhaQeTrQGvJuVPcyputhPHUqAdLbqY8d/+OnhQ\r\nUAeFcYHmfblnSDp34dcDe672MiWJHfJqrPf95RZ7l+gXwnZp7r5yDbl4AA8R\r\njbcCfrWtGdMWLRWqBGrAgDKlCDEM96qb7QLtE9ZxVXV2jEeU/Fbny4mvVBpO\r\nXi0eFGLkqVhmHhk58pWYRouO19M25dCFhhImF8gmsAyY2EHJZBPanDovLeHw\r\nM/yIvDodxE2C01TsTdYPMC5Tiz+ixMRxtqn6MEkE4mVnFaIIfezFurJ/7X4F\r\neNYp5ceGb24ps9rwFYLAvXe5e+ReoBXUu+1t6juTXqCtMHQXm9TCaBK1F8nb\r\nf0wwRvzkNTiUvE/tIpxfApRMLUEw3vGUj+rfhEXxTTsvPb1OjHs039XdKSHJ\r\n10yd/3d2UrrRTNj2s7lf/x3cyopFdTWNwuI=\r\n=IoLE\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","gitHead":"300965d91e6554c84da365309ee3f3be91d5a9e8","scripts":{"test":"jest","build":"babel src --out-dir build","prepublishOnly":"npm run build"},"_npmUser":{"name":"bucky24","email":"rwijtman@gmail.com"},"repository":{"url":"git+ssh://git@gitlab.com/bucky24/toolbox.git","type":"git"},"_npmVersion":"7.24.0","description":"Collection of tools","directories":{},"_nodeVersion":"16.10.0","_hasShrinkwrap":false,"devDependencies":{"jest":"28.1.2","@babel/cli":"^7.18.6","@babel/core":"^7.18.6","@babel/preset-env":"7.18.6"},"_npmOperationalInternal":{"tmp":"tmp/toolbox_0.1.0_1657492501117_0.595386672639638","host":"s3://npm-registry-packages"}},"0.2.0":{"name":"@bucky24/toolbox","version":"0.2.0","author":{"name":"bucky24"},"license":"ISC","_id":"@bucky24/toolbox@0.2.0","maintainers":[{"name":"bucky24","email":"rwijtman@gmail.com"}],"homepage":"https://gitlab.com/bucky24/toolbox#readme","bugs":{"url":"https://gitlab.com/bucky24/toolbox/issues"},"dist":{"shasum":"3f80dde5c8323306f1e079ff796df797abe9dce3","tarball":"https://registry.npmjs.org/@bucky24/toolbox/-/toolbox-0.2.0.tgz","fileCount":9,"integrity":"sha512-xgRGJagbl8QZJOUlv6YH457BsqR1E+gyCsgDa3yT/ldkW9t3Twq0d4TOGdrNW/t8qGg8EtZ6cwygX3FVkZ8PCQ==","signatures":[{"sig":"MEUCIAV1zWXjM5pVrDmgkwCcxjat44TXzI+XciU8iiz7w1wTAiEAj7pDXNur7BNpGfoBL8dkNj31NK9WB5or/fFyGsQG35U=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":8689},"main":"client/index.js","gitHead":"e100c2a54d5b7a9624b48190b45ab709e4ed1311","scripts":{"test":"jest"},"_npmUser":{"name":"bucky24","email":"rwijtman@gmail.com"},"repository":{"url":"git+ssh://git@gitlab.com/bucky24/toolbox.git","type":"git"},"_npmVersion":"9.5.1","description":"Collection of tools","directories":{},"_nodeVersion":"18.16.0","dependencies":{"jsonwebtoken":"^9.0.2"},"_hasShrinkwrap":false,"devDependencies":{"jest":"28.1.2","@babel/cli":"^7.18.6","@babel/core":"^7.18.6","@babel/preset-env":"7.18.6"},"_npmOperationalInternal":{"tmp":"tmp/toolbox_0.2.0_1711307875078_0.9166917685408909","host":"s3://npm-registry-packages"}},"0.2.1":{"name":"@bucky24/toolbox","version":"0.2.1","author":{"name":"bucky24"},"license":"ISC","_id":"@bucky24/toolbox@0.2.1","maintainers":[{"name":"bucky24","email":"rwijtman@gmail.com"}],"homepage":"https://gitlab.com/bucky24/toolbox#readme","bugs":{"url":"https://gitlab.com/bucky24/toolbox/issues"},"dist":{"shasum":"a455f6c172d5b7a633060f6bac2a1ecdff872a6c","tarball":"https://registry.npmjs.org/@bucky24/toolbox/-/toolbox-0.2.1.tgz","fileCount":9,"integrity":"sha512-qP89b4OLkXp/nlJspmk+xW0SVPgUdp8FeGQgk3y6n/Kn4fQet3IY+p2KkzdPMIKh77Q+sbQX4z3OHA7TIoV55g==","signatures":[{"sig":"MEUCIQCWaZcmL5zVEcNPkCRyEBC+EhpcQ+mDxP6OHHIwLI2ApAIgVq2/KG5RTzop2NsfLHdaETF7c3oMvwf3D0GH5d/dDRI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":8782},"main":"client/index.js","gitHead":"69f4e25cfbf728d92632a82c648f04d6946c8672","scripts":{"test":"jest"},"_npmUser":{"name":"bucky24","email":"rwijtman@gmail.com"},"repository":{"url":"git+ssh://git@gitlab.com/bucky24/toolbox.git","type":"git"},"_npmVersion":"9.5.1","description":"Collection of tools","directories":{},"_nodeVersion":"18.16.0","dependencies":{"jsonwebtoken":"^9.0.2"},"_hasShrinkwrap":false,"devDependencies":{"jest":"28.1.2","@babel/cli":"^7.18.6","@babel/core":"^7.18.6","@babel/preset-env":"7.18.6"},"_npmOperationalInternal":{"tmp":"tmp/toolbox_0.2.1_1711308059214_0.03281181712458059","host":"s3://npm-registry-packages"}},"0.3.0":{"name":"@bucky24/toolbox","version":"0.3.0","author":{"name":"bucky24"},"license":"ISC","_id":"@bucky24/toolbox@0.3.0","maintainers":[{"name":"bucky24","email":"rwijtman@gmail.com"}],"homepage":"https://gitlab.com/bucky24/toolbox#readme","bugs":{"url":"https://gitlab.com/bucky24/toolbox/issues"},"dist":{"shasum":"0ad0b2ff57ede9cad4cc33a564d0f961e26d06b9","tarball":"https://registry.npmjs.org/@bucky24/toolbox/-/toolbox-0.3.0.tgz","fileCount":11,"integrity":"sha512-iypitM1Y5bOERntfHzqtnuRbKHgApPUgD01+Iby0WyTaKcclHuypY5J0vhXf/VRuWdkQ/SOThdpxz2jlOgJtow==","signatures":[{"sig":"MEUCIQDvXIXYwgpUOWJPADYXSG/Hx9j91qwKQQtJy6cMWrE+eAIgSbCFBYDyFFz/6F6i2FarkYZajkDK0QoPZdl6TjxbPnw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":10855},"main":"client/index.js","gitHead":"31ab60351a6167bd944e073751aa4009e8592f9d","scripts":{"test":"jest"},"_npmUser":{"name":"bucky24","email":"rwijtman@gmail.com"},"repository":{"url":"git+ssh://git@gitlab.com/bucky24/toolbox.git","type":"git"},"_npmVersion":"9.5.1","description":"Collection of tools","directories":{},"_nodeVersion":"18.16.0","dependencies":{"jsonwebtoken":"^9.0.2","react-router-dom":"^6.22.3"},"_hasShrinkwrap":false,"devDependencies":{"jest":"28.1.2","react":"^18.2.0","@babel/cli":"^7.18.6","@babel/core":"^7.18.6","@babel/preset-env":"7.18.6"},"peerDependencies":{"react":"18.x.x"},"_npmOperationalInternal":{"tmp":"tmp/toolbox_0.3.0_1711393542687_0.9081365246721018","host":"s3://npm-registry-packages"}},"0.3.1":{"name":"@bucky24/toolbox","version":"0.3.1","author":{"name":"bucky24"},"license":"ISC","_id":"@bucky24/toolbox@0.3.1","maintainers":[{"name":"bucky24","email":"rwijtman@gmail.com"}],"homepage":"https://gitlab.com/bucky24/toolbox#readme","bugs":{"url":"https://gitlab.com/bucky24/toolbox/issues"},"dist":{"shasum":"56c6aaa89e4267db734e1e4983ee104534dd9a13","tarball":"https://registry.npmjs.org/@bucky24/toolbox/-/toolbox-0.3.1.tgz","fileCount":11,"integrity":"sha512-QSnP6B+cy2gI8LIJVNzbKF6b9ocPfJUbjgQeWBfj8k6PBIjShb/Ms55DTRE7IEdhkeiuoyvgdEP+5jtKczTuGA==","signatures":[{"sig":"MEUCID+I/1iO4nyu+Ss54unB9YwS1KkDwTEIUof20Zqrnw8oAiEAxpQzAQtWS5XpgtSqI6mg5UyuK/8Jfc/mBJRPB5W3MhQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":11079},"main":"client/index.js","gitHead":"cc30b3d8a23abe94c6bf00c8e978f1211e63297b","scripts":{"test":"jest"},"_npmUser":{"name":"bucky24","email":"rwijtman@gmail.com"},"repository":{"url":"git+ssh://git@gitlab.com/bucky24/toolbox.git","type":"git"},"_npmVersion":"9.5.1","description":"Collection of tools","directories":{},"_nodeVersion":"18.16.0","dependencies":{"jsonwebtoken":"^9.0.2","react-router-dom":"^6.22.3"},"_hasShrinkwrap":false,"devDependencies":{"jest":"28.1.2","react":"^18.2.0","@babel/cli":"^7.18.6","@babel/core":"^7.18.6","@babel/preset-env":"7.18.6"},"peerDependencies":{"react":"18.x.x"},"_npmOperationalInternal":{"tmp":"tmp/toolbox_0.3.1_1714607387097_0.5746721547214275","host":"s3://npm-registry-packages"}},"0.5.0":{"name":"@bucky24/toolbox","version":"0.5.0","author":{"name":"bucky24"},"license":"ISC","_id":"@bucky24/toolbox@0.5.0","maintainers":[{"name":"bucky24","email":"rwijtman@gmail.com"}],"homepage":"https://gitlab.com/bucky24/toolbox#readme","bugs":{"url":"https://gitlab.com/bucky24/toolbox/issues"},"dist":{"shasum":"79364533a23e2b2961722b6cdd3bb2a29e743c3d","tarball":"https://registry.npmjs.org/@bucky24/toolbox/-/toolbox-0.5.0.tgz","fileCount":7,"integrity":"sha512-NXAldLVMMbEWVNbrzZnrcy4mhKu6wh0s6qHtEEHU4m3D7iow0wHJJpYLg2YwE8M5yNQQbV414aOQUMn8uzxMSQ==","signatures":[{"sig":"MEYCIQCoRQC1IIvzUAkV2TRYRzyAYkEU+GtKtB9xFr6M4nzw2QIhAOxU/+oh31Tu9psuJmpbcE9CuWsQyD+HDH+E88L8OFCb","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":11299},"main":"src/index.js","gitHead":"8366965c988e90b3b6c4c36f34fcbe25029d0d9f","scripts":{"test":"jest"},"_npmUser":{"name":"bucky24","email":"rwijtman@gmail.com"},"repository":{"url":"git+ssh://git@gitlab.com/bucky24/toolbox.git","type":"git"},"_npmVersion":"10.8.2","description":"Collection of tools","directories":{},"_nodeVersion":"20.19.3","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/toolbox_0.5.0_1756227999941_0.19833062263039136","host":"s3://npm-registry-packages-npm-production"}},"0.5.1":{"name":"@bucky24/toolbox","version":"0.5.1","description":"Collection of tools","main":"src/index.js","scripts":{"test":"jest"},"exports":{".":"./src/index.js","./client":"./src/client/index.js"},"repository":{"type":"git","url":"git+ssh://git@gitlab.com/bucky24/toolbox.git"},"author":{"name":"bucky24"},"license":"ISC","bugs":{"url":"https://gitlab.com/bucky24/toolbox/issues"},"homepage":"https://gitlab.com/bucky24/toolbox#readme","_id":"@bucky24/toolbox@0.5.1","gitHead":"588db89a16fad15df86bd8353f8c2c81fd849ba8","_nodeVersion":"20.19.3","_npmVersion":"10.8.2","dist":{"integrity":"sha512-deVup9jLXtM7FvmLIME3q/xOu+nC2m/vBspybdcOOtugu3VrDhZasuFgG3EKk3OLG459zL6/mrdKeMCGdhBDUA==","shasum":"0e84d9f79367f4e232840d8cc77be7fd6db1a2a9","tarball":"https://registry.npmjs.org/@bucky24/toolbox/-/toolbox-0.5.1.tgz","fileCount":7,"unpackedSize":11424,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQChhxt/g4ax+e3gPMtDVWD/eA+oNgB78GhQchaOl+VNEwIgcwg/nb+OeKePJpLCdhcB54AT0JBqqroQEhXOD0TFcr8="}]},"_npmUser":{"name":"bucky24","email":"rwijtman@gmail.com"},"directories":{},"maintainers":[{"name":"bucky24","email":"rwijtman@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/toolbox_0.5.1_1756228602648_0.7372879309667684"},"_hasShrinkwrap":false}},"time":{"created":"2022-07-10T22:35:01.055Z","modified":"2025-08-26T17:16:43.004Z","0.1.0":"2022-07-10T22:35:01.414Z","0.2.0":"2024-03-24T19:17:55.231Z","0.2.1":"2024-03-24T19:20:59.389Z","0.3.0":"2024-03-25T19:05:42.847Z","0.3.1":"2024-05-01T23:49:47.258Z","0.5.0":"2025-08-26T17:06:40.143Z","0.5.1":"2025-08-26T17:16:42.838Z"},"bugs":{"url":"https://gitlab.com/bucky24/toolbox/issues"},"author":{"name":"bucky24"},"license":"ISC","homepage":"https://gitlab.com/bucky24/toolbox#readme","repository":{"type":"git","url":"git+ssh://git@gitlab.com/bucky24/toolbox.git"},"description":"Collection of tools","maintainers":[{"name":"bucky24","email":"rwijtman@gmail.com"}],"readme":"# Toolbox\n\nThis is intended to be a collection of misc things that I've had to do over and over again. It is small but will hopefully continue to grow.\n\n## Importing\n\nImport the code by using:\n\n```\nimport { Polygon } from '@bucky24/toolbox';\n```\n\nOr for client items:\n\n```\nimport { usePersistedState } from '@bucky24/toolbox/client';\n```\n\n## Exports\n\n### Polygon\n\nThe Polygon class contains methods for manipulating and getting data about polygons.\n\n#### pointInsidePolygon\n\nThis method returns a boolean indicating if the given Point is inside the given Polygon\n\n| param | type | description |\n| -- | -- | -- |\n| point | Point | The point to check against the polygon |\n| polygon | Polygon | The Polygon to check |\n\n### Line\n\nThe Line class contains methods for getting data about lines\n\n#### distanceFromLine\n\nThis method will calculate the distance from a Point to a Line. Note this does not calculate distance to a line segment, the Points given in the Line are used to calculate a line of infinite length.\n\n| param | type | description |\n| -- | -- | -- |\n| line | Line | The line to use for distance |\n| point | Point | The point to use for distance |\n\n#### doLinesIntersect\n\nThis method returns a boolean if the two Lines provided intersect. This is done on line segments, not infinite lines.\n\n| param | type | description |\n| -- | -- | -- |\n| line1 | Line | The line to compare |\n| line2 | Line | The second line to compare |\n\n### usePersistedState\n\nThis behaves like `useState` in React, but persists the value to localStorage. On load, it attempts to load any value from localStorage. This allows a simple persisting of various state across reloads.\n\n## Types\n\n### Point\n\nA point is a simple object that contains a numeric x and a numeric y.\n\n### Polygon\n\nThe Polygon type is simply an array of Points.\n\n### Line\n\nA line is simply an array containing two Points, representing the start and end of a line segment.","readmeFilename":"README.md"}