{"_id":"round-to","_rev":"17-4f3b3e1cab507239841b21c4fb626182","name":"round-to","dist-tags":{"latest":"7.0.0"},"versions":{"1.0.0":{"name":"round-to","version":"1.0.0","keywords":["round","number","num","decimal","places","ceil","floor","math","increment"],"author":{"url":"sindresorhus.com","name":"Sindre Sorhus","email":"sindresorhus@gmail.com"},"license":"MIT","_id":"round-to@1.0.0","maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"homepage":"https://github.com/sindresorhus/round-to","bugs":{"url":"https://github.com/sindresorhus/round-to/issues"},"dist":{"shasum":"4bf6ee490655573981b8a99651e7f4f4a412e822","tarball":"https://registry.npmjs.org/round-to/-/round-to-1.0.0.tgz","integrity":"sha512-wNaVNm7u6wgcjFyE726sc9z0qPtt+obHP5Y4Np0cym2OXINyWm6OICStiuVqykTeRcc94KWpi7v+wLD7XFF6jg==","signatures":[{"sig":"MEYCIQDfFLLCFD4LFLh6gB+TBqbFeYMalFIQzwGmrmiiOP5Z4wIhANaoTTGLuFnIuqfWApBZGhOaFdgHiQkCGO1a+YktNr+T","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"_from":".","files":["index.js"],"_shasum":"4bf6ee490655573981b8a99651e7f4f4a412e822","engines":{"node":">=0.10.0"},"gitHead":"94d432463aa88e2147853b698d106a3960e0cb6c","scripts":{"test":"xo && node test.js"},"_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"repository":{"url":"https://github.com/sindresorhus/round-to","type":"git"},"_npmVersion":"2.11.2","description":"Round a number to a specific number of decimal places: 1.234 → 1.2","directories":{},"_nodeVersion":"0.12.5","dependencies":{"number-is-integer":"^1.0.0"},"devDependencies":{"xo":"*","ava":"0.0.4"}},"1.1.0":{"name":"round-to","version":"1.1.0","keywords":["round","number","num","decimal","places","ceil","floor","math","increment"],"author":{"url":"sindresorhus.com","name":"Sindre Sorhus","email":"sindresorhus@gmail.com"},"license":"MIT","_id":"round-to@1.1.0","maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"homepage":"https://github.com/sindresorhus/round-to","bugs":{"url":"https://github.com/sindresorhus/round-to/issues"},"dist":{"shasum":"aa2057a61263021a9784b36be175bf16bdec9a5a","tarball":"https://registry.npmjs.org/round-to/-/round-to-1.1.0.tgz","integrity":"sha512-xSTDhkjQfVudmd1E6CWTTJzQuQMCYmehJpMRMmAcZPos4zOICuswJ0KXetaCZKCrMi+FZlFTktd1+25xnvAmDA==","signatures":[{"sig":"MEYCIQCNXKqQRaLhNgegeLKpstr6AHOa8Eeh7aUJdeqKyj7OlQIhAKke0T2sBb2d9PKkaHjT/4G/GX0o8+DZf7weJkbdU/KL","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"_from":".","files":["index.js"],"_shasum":"aa2057a61263021a9784b36be175bf16bdec9a5a","engines":{"node":">=0.10.0"},"gitHead":"5b2970ca204e7fa6854360dca1b15a9769ad3b62","scripts":{"test":"xo && node test.js"},"_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"repository":{"url":"https://github.com/sindresorhus/round-to","type":"git"},"_npmVersion":"2.14.4","description":"Round a number to a specific number of decimal places: 1.234 → 1.2","directories":{},"_nodeVersion":"4.1.1","dependencies":{"number-is-integer":"^1.0.0"},"devDependencies":{"xo":"*","ava":"0.0.4"}},"2.0.0":{"name":"round-to","version":"2.0.0","keywords":["round","number","num","decimal","places","ceil","floor","math","increment"],"author":{"url":"sindresorhus.com","name":"Sindre Sorhus","email":"sindresorhus@gmail.com"},"license":"MIT","_id":"round-to@2.0.0","maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"homepage":"https://github.com/sindresorhus/round-to#readme","bugs":{"url":"https://github.com/sindresorhus/round-to/issues"},"dist":{"shasum":"bcef4f2bcafd9480902c2142150b28c897f03e37","tarball":"https://registry.npmjs.org/round-to/-/round-to-2.0.0.tgz","integrity":"sha512-7L9nKsUGvzAQAqWioq/vI1ncAkhBWE4gbh/2CQ8DMidFolUcw7YOSxtGOewHizh/syaxR9FK21IVPRlCvyPVRw==","signatures":[{"sig":"MEYCIQD+Z+4a5B2trWmdyiz/oF12oh5qwwJ9vDFX3e7pN2DVxQIhAOb1Ogih29HNL4ADQsOWJKbIXrqAjaqTEdJpL9NB1U3K","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"_from":".","files":["index.js"],"_shasum":"bcef4f2bcafd9480902c2142150b28c897f03e37","engines":{"node":">=4"},"gitHead":"360f4f5715d98ebda4078617a577099b7a4d286f","scripts":{"test":"xo && ava"},"_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"repository":{"url":"git+https://github.com/sindresorhus/round-to.git","type":"git"},"_npmVersion":"2.15.11","description":"Round a number to a specific number of decimal places: 1.234 → 1.2","directories":{},"_nodeVersion":"4.6.2","devDependencies":{"xo":"*","ava":"*"},"_npmOperationalInternal":{"tmp":"tmp/round-to-2.0.0.tgz_1485172292690_0.6277329190634191","host":"packages-12-west.internal.npmjs.com"}},"3.0.0":{"name":"round-to","version":"3.0.0","keywords":["round","number","num","decimal","places","ceil","floor","math","increment"],"author":{"url":"sindresorhus.com","name":"Sindre Sorhus","email":"sindresorhus@gmail.com"},"license":"MIT","_id":"round-to@3.0.0","maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"homepage":"https://github.com/sindresorhus/round-to#readme","bugs":{"url":"https://github.com/sindresorhus/round-to/issues"},"dist":{"shasum":"f457177d68e5a1d9d55796528cd03daea0bb4fb9","tarball":"https://registry.npmjs.org/round-to/-/round-to-3.0.0.tgz","fileCount":4,"integrity":"sha512-h8xeIC7dRHkY++BGKtXTlO/FifRJdUmW5YObBk/8X9nc/2syNXKN8qUA6OvCgmPdtYlWvDqKZOuxz/CX6dcZNg==","signatures":[{"sig":"MEUCIBRpkv4L4mjArMzSuGatzRNYICzQ2CYZWQHTO7d5xPodAiEA3USC8ADHVOr8KzqZhNSDQVvHBg42utS39kTLofut9Cg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3812},"files":["index.js"],"engines":{"node":">=6"},"gitHead":"1427fc03e9103f113da9338095ee48cbaa9dd8dc","scripts":{"test":"xo && ava"},"_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"repository":{"url":"git+https://github.com/sindresorhus/round-to.git","type":"git"},"_npmVersion":"5.6.0","description":"Round a number to a specific number of decimal places: `1.234` → `1.2`","directories":{},"_nodeVersion":"8.10.0","_hasShrinkwrap":false,"devDependencies":{"xo":"*","ava":"*"},"_npmOperationalInternal":{"tmp":"tmp/round-to_3.0.0_1523534830767_0.8320286709014082","host":"s3://npm-registry-packages"}},"4.0.0":{"name":"round-to","version":"4.0.0","keywords":["round","number","num","decimal","places","ceil","floor","math","increment"],"author":{"url":"sindresorhus.com","name":"Sindre Sorhus","email":"sindresorhus@gmail.com"},"license":"MIT","_id":"round-to@4.0.0","maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"homepage":"https://github.com/sindresorhus/round-to#readme","bugs":{"url":"https://github.com/sindresorhus/round-to/issues"},"dist":{"shasum":"7576de9f721e58bd8116757fc3ba10f44d5b3886","tarball":"https://registry.npmjs.org/round-to/-/round-to-4.0.0.tgz","fileCount":5,"integrity":"sha512-2HD3qSm7FGv1uBQywsK43YtSeXQhh5CUscaFGsvbr38oZzfLqoPQAPw2ngvpXKruAEsn7WuPXdq1mrUSkR70MQ==","signatures":[{"sig":"MEUCIQCv4195jmIZMfn0tv6foKDtd0XjHqF/Pf3ABVSzi3fjBwIgP9xXyiU1HJxjzjBYcIC2jiR5EbeV2EtlavTqkLAlJIQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":5291,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcwqsLCRA9TVsSAnZWagAA9YMP/30PSiIUNaNylWFH7fNe\nilySorVOmTo2ZnByBjwnZjTKpje/XOEvzHJTbt+wIlkoKe6m5OqXgKTcbc6i\naN3OlaL/Fix8cDDmq39I93Rjr/ST0i/GBaiIO5EMhHV+D+XljIln5d+X9/u0\nAmapP9JFKP9E7vZA0/msFXR9Qzsw0qBvpNS/WBmb/KT+GH5bR2XwRgsOgC45\nvNr+CatvsIx8U1P0j+f0rJfbUa64h6LWCzBIgaiKbQty2gXrovcYgdbWXPiy\nQSMwzI778Ldgr0KEA4AlOm9enGHJ7TRKeMx8W8SqAdaxn1Vc71wYY/crbiip\n3yCzfWj5EgJPCLfIJ2FqVJPgJjEdrGY58ArDqu2YJjLRs+msgOJYLyyqYNzF\nDiX7aEihF6HMaYfmjR66s+/3qKNWyHNnvMMfXwHQJbneaH5h5re15XdZ5IsU\njrwe1awleiK5noertwEg/i7ZbmldgJuMVSx92XXfQ5Wnioiq6V9bnM7yjeU7\neD1PxQWCL5bmgKO/5oYK0TAZ1ovvgJk4fDY92dokrpJg0/u3GGqHM3q8aCc/\ny2pGBPDn8HOM/2cdoYoq7Pc110mVBfZeUYpRgqVNJaoJphQozlniNmBKOyRR\nTrtuWWM9Tw26WcIL3nNx0OWkKl2r7c+zYRauaoYTJBWaddZ8QSx4pU3VjFBS\nu4eF\r\n=7Fbk\r\n-----END PGP SIGNATURE-----\r\n"},"engines":{"node":">=8"},"gitHead":"03781d85706f1c5c35a93512b7dfd50df8ca35a7","scripts":{"test":"xo && ava && tsd"},"_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"repository":{"url":"git+https://github.com/sindresorhus/round-to.git","type":"git"},"_npmVersion":"6.9.0","description":"Round a number to a specific number of decimal places: `1.234` → `1.2`","directories":{},"_nodeVersion":"10.15.3","_hasShrinkwrap":false,"devDependencies":{"xo":"^0.24.0","ava":"^1.4.1","tsd":"^0.7.2"},"_npmOperationalInternal":{"tmp":"tmp/round-to_4.0.0_1556261642931_0.44475483447301634","host":"s3://npm-registry-packages"}},"4.1.0":{"name":"round-to","version":"4.1.0","keywords":["round","number","num","decimal","places","ceil","floor","math","increment"],"author":{"url":"sindresorhus.com","name":"Sindre Sorhus","email":"sindresorhus@gmail.com"},"license":"MIT","_id":"round-to@4.1.0","maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"homepage":"https://github.com/sindresorhus/round-to#readme","bugs":{"url":"https://github.com/sindresorhus/round-to/issues"},"dist":{"shasum":"148d768d18b2f127f78e6648cb8b0a5943c416bf","tarball":"https://registry.npmjs.org/round-to/-/round-to-4.1.0.tgz","fileCount":5,"integrity":"sha512-H/4z+4QdWS82iMZ23+5St302Mv2jJws0hUvEogrD6gC8NN6Z5TalDtbg51owCrVy4V/4c8ePvwVLNtlhEfPo5g==","signatures":[{"sig":"MEUCIQCDMk3+7Y94aYLkU9HKhInhv8nyI8Q03HRjmSQN46NmrgIgBtQHJRoA6QGz3mUd0frfQzuIA4DuxoNeKec5uZOVrIY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":5526,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeIEOJCRA9TVsSAnZWagAAPP8P/2gZad7PMGJIfFL83YGz\nXXSHjboxPM5P/czD829/Ssu5y9CyJ5ZW5SMCziTMercFUcPUuvWPIJCIY7/M\neRtQcnz8nZfQ3CSFU6LQF5gD/rUwWzpiROd08/0awRsUXyjRQ1GM0VgqPsEB\ncfKBdh00EB6ZSyAqk28vNLXM34C6U2eurq2d5XfLuZmM8wxm+gGg0hzxQrh7\nFbp9Wz9SHiGL3YBagseWvefVUUkjstbFxlLYXRBAlAplOshZdF/Vc4+CLoUf\nWa+mIRXS5maBvq9AjGE2O7BRdXQeIh5n1euA+wA3WPCA0F1eoWeidwYCKScl\n0x+zu09vFIaYSTeqv2P/QU+rP5Wm7qsqPBbNWe4VmG/hCSNFSHqVzOymRj84\ntX9cOpTbZEUJ4PWOky79DszpwbGwmPHhbNaw0g56nOJci2CnoEAnnTI92U8C\nJ3qOLsxTnSr2vZWsVFMXpJ83FbSfqSvHJUj9ZH8eu+LgwD/BdLt6XQwGaYUb\nKlY2YIYO0arNDgb56ZtglIn5OEFWhv9S2TMhvw/UD9urFyM9AkDGZNiPox7F\nm4LxYYBoZs/twjLN/Z7Eo2mS0LsvJSlOXkVLo9CxK+qroLKqAmQjSQ8nVvrH\nSkOWVj5en/w2hc2ihnXX3U1LLrEiBjb5Lt4Q23nL3pC0kO05v4MZXLavoh1q\nvW6D\r\n=YoEQ\r\n-----END PGP SIGNATURE-----\r\n"},"engines":{"node":">=8"},"gitHead":"feef6236da40f576166f7b772bd456ed842eab65","scripts":{"test":"xo && ava && tsd"},"_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"repository":{"url":"git+https://github.com/sindresorhus/round-to.git","type":"git"},"_npmVersion":"6.11.3","description":"Round a number to a specific number of decimal places: `1.234` → `1.2`","directories":{},"_nodeVersion":"10.17.0","_hasShrinkwrap":false,"devDependencies":{"xo":"^0.24.0","ava":"^1.4.1","tsd":"^0.7.2"},"_npmOperationalInternal":{"tmp":"tmp/round-to_4.1.0_1579172744533_0.15369409070870743","host":"s3://npm-registry-packages"}},"5.0.0":{"name":"round-to","version":"5.0.0","keywords":["round","number","num","decimal","places","ceil","floor","math","increment"],"author":{"url":"https://sindresorhus.com","name":"Sindre Sorhus","email":"sindresorhus@gmail.com"},"license":"MIT","_id":"round-to@5.0.0","maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"homepage":"https://github.com/sindresorhus/round-to#readme","bugs":{"url":"https://github.com/sindresorhus/round-to/issues"},"dist":{"shasum":"a66292701a93b194f630a0d57f04c08821b6eeed","tarball":"https://registry.npmjs.org/round-to/-/round-to-5.0.0.tgz","fileCount":5,"integrity":"sha512-i4+Ntwmo5kY7UWWFSDEVN3RjT2PX1FqkZ9iCcAO3sKML3Ady9NgsjM/HLdYKUAnrxK4IlSvXzpBMDvMHZQALRQ==","signatures":[{"sig":"MEUCIQDKwR4L+4DfCXr0VwDESUp1+TRPcSmqjRw/SKPBOEYMBgIgGCCSzgecZGRz8DnrSU/WMVGJZyQ6an+zRytYn/GKGzM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":5424,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfjx0bCRA9TVsSAnZWagAAggcQAJWL5lpzrWUu+qgwCGqp\nruyoyP3fo88fV0bxcvlk95Xq5p7oB5ZKUSgOnEDxoLtV8jVV4i5CZlGN1byA\nwZhPUqd/aLCFYN6VjNMKHfwx3AoPEO1G0rMPIb2dC7Q5wFKz9jXcDXumdolq\ny2yhQbX9TT9PcoOz0s5tMjL/atdtUL2P7amTBQNeblbaxOb/fQxRdxWbFIQk\naORLASIaJBdhqUXc8aSgH0ahyh7fK72UgRz2kJHoWTSNRXsXzZbBdMMUI6Kr\nTx5ZYRQEZpxhFK1Qj8xpJ6M6pO4rp0cGd68G5fOnFXothrrZt8JxXrttSZEw\n6BJdAI/ufs6HsgEvOawQKl04gnSni8fKJBf+zFUdU68CFbHXosWLw6tx5p5C\nA5EYmfR2tKZ3uc8BYQf+aR6q1xDyd8GhfQnUMzcjUUkf+XzaFXMdj4u/3Jse\n/fl9QH7/095nsFUog8O4Ni01fLrqChSQnCIP7OKIQMDuMoRNRQEqHxJAvV+B\nEPD1DKDtYYR+feJ2bmSpePPMyf7ggjIkkVznWfsHtmprsn4j4KbbVjW/045f\ns49LtX17mNDIHvzIGdyeQpH2vFef/mWTnGDupsI3x8ciUO3bdJiFYo8OTXiu\nfvP93aZRPgV3c9VG3jTm/i0K6eGG2pIbx8d8SfHG78GE3p6dqqFRm9RW4Rml\nfEwu\r\n=V1JG\r\n-----END PGP SIGNATURE-----\r\n"},"engines":{"node":">=10"},"funding":"https://github.com/sponsors/sindresorhus","gitHead":"6a4f4a0da2a995569569aeaed09910db1e235fb1","scripts":{"test":"xo && ava && tsd"},"_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"repository":{"url":"git+https://github.com/sindresorhus/round-to.git","type":"git"},"_npmVersion":"6.14.8","description":"Round a number to a specific number of decimal places: `1.234` → `1.2`","directories":{},"_nodeVersion":"14.11.0","_hasShrinkwrap":false,"devDependencies":{"xo":"^0.34.1","ava":"^2.4.0","tsd":"^0.13.1"},"_npmOperationalInternal":{"tmp":"tmp/round-to_5.0.0_1603214618706_0.6851396710835411","host":"s3://npm-registry-packages"}},"6.0.0":{"name":"round-to","version":"6.0.0","keywords":["round","number","decimal","places","ceil","floor","math","increment","precision"],"author":{"url":"https://sindresorhus.com","name":"Sindre Sorhus","email":"sindresorhus@gmail.com"},"license":"MIT","_id":"round-to@6.0.0","maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"homepage":"https://github.com/sindresorhus/round-to#readme","bugs":{"url":"https://github.com/sindresorhus/round-to/issues"},"dist":{"shasum":"c12a8dee3c78cbc981d161ba8ff0214abd6cae53","tarball":"https://registry.npmjs.org/round-to/-/round-to-6.0.0.tgz","fileCount":5,"integrity":"sha512-jFvBgyRueGU0QVa7EqXZOkarkzrqEnF3VTCzATRcBkzxXJ4/+pzDf1iouqOqGsx6ZpnIIu5gvFDGnyzoX58ldQ==","signatures":[{"sig":"MEUCIQC1WMn2QYvA7vbqkArlQBanC7qrxCiGdnOWYLJdzT1BKAIgJ4QAcgwSzhYtZQ/1wqlvibMNUSFI4trGfrRW7/tKLeM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":5404,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh26EUCRA9TVsSAnZWagAAW74QAJs4aP2w9ZLME0+PGPRx\nEmI9Bgmni6p/L25m82yOHzcZ0s0Nomcb0qS2B7kLWvzKAQhhsHBjeaG/78tl\nXSXu3peKWbrvQHvKacy4vySbFj+fXD5gbGNg9IQwxXygqyM4VjFRtHOQtJQe\n+hxK/V0VQ/TG57iBSCZgi7JWbHElLAraznAtSipam/rSXCydH/OTQi44p2lg\nAC95lHCDY7o2EOSE1DhbfcypALztwmTQZ8PfFonHTKtIjj7w1HRLcHKuJ7yV\nhZ5DI1xprJ+Ub1uv95Tgdx6anhkgFpqTfPfdY+ohLtKir5oOt8gBsIsBuA7Q\nrFfKDl7dG2inWw82H90hJ4oNOEVsPXTIvKBTELdWKld4xad+WYiTnq02RFQk\nPpLWgM+A25dAzqzeqb7G3IavMNyWZW2xU3w3+yf3t1qLg9DcQx8vRU3BJMjI\nAYsVOpSlbtbzlTIWQRK4NUmEijGnvZLWCZbObw1HgpU0rPLzZ04y9zJVlAbR\nffsaO1tfdcTmi8ThKlUHeFGv5kvo47brydDISE+G1QmJL/nLHGdrWuEL7KBf\nf3mytFp/rCZ1ovQ6ooXk/8LKHzB+KFArWMP6FIHSDuTdSaORXm2xKkC65i6c\nfd5RjuK1FtoCuBuu8A02PV5sOoBT1yxvJq4zA51cRk9x7v2vPvF1ncJ09NuO\nO+wc\r\n=wwFp\r\n-----END PGP SIGNATURE-----\r\n"},"type":"module","types":"./index.d.ts","engines":{"node":"^12.20.0 || ^14.13.1 || >=16.0.0"},"exports":"./index.js","funding":"https://github.com/sponsors/sindresorhus","gitHead":"1f6af16f96a7fbc0200779a9b10668cd8303313a","scripts":{"test":"xo && ava && tsd"},"_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"repository":{"url":"git+https://github.com/sindresorhus/round-to.git","type":"git"},"_npmVersion":"8.1.0","description":"Round a number to a specific number of decimal places: `1.234` → `1.2`","directories":{},"_nodeVersion":"12.22.1","_hasShrinkwrap":false,"devDependencies":{"xo":"^0.46.4","ava":"^3.15.0","tsd":"^0.18.0"},"_npmOperationalInternal":{"tmp":"tmp/round-to_6.0.0_1636136924547_0.2044523388631685","host":"s3://npm-registry-packages"}},"7.0.0":{"name":"round-to","version":"7.0.0","description":"Round a number to a specific number of decimal places: `1.234` → `1.2`","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/round-to.git"},"funding":"https://github.com/sponsors/sindresorhus","author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"type":"module","exports":"./index.js","types":"./index.d.ts","sideEffects":false,"engines":{"node":"^12.20.0 || ^14.13.1 || >=16.0.0"},"scripts":{"test":"xo && ava && tsd"},"keywords":["round","number","decimal","places","ceil","floor","math","increment","precision"],"devDependencies":{"ava":"^6.4.1","tsd":"^0.33.0","xo":"^1.2.2"},"_id":"round-to@7.0.0","gitHead":"e006ef5eccc05eca28d8f250bdfb29005f6fe228","bugs":{"url":"https://github.com/sindresorhus/round-to/issues"},"homepage":"https://github.com/sindresorhus/round-to#readme","_nodeVersion":"20.19.5","_npmVersion":"10.9.2","dist":{"integrity":"sha512-2J9phHeB0lAQYZkTGzAqFZ1MaXGsIOiatkHTkL+s9uer0Bd5iClTUovyeNsRY5NgXzGp74cRvHSUWjjGea+s5A==","shasum":"3ab9f9eaef44abd4730e261d6dfd110191f6b1e9","tarball":"https://registry.npmjs.org/round-to/-/round-to-7.0.0.tgz","fileCount":5,"unpackedSize":10913,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIG6AHLXBEpaGy8yAh9iiihILmnhBnQC6FE9qyVsJ+Kc4AiBrhdvx80yb9kmCJFrL6DU/wCbauQW6zQZRlzOUHTsamA=="}]},"_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"directories":{},"maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/round-to_7.0.0_1758098808973_0.7131448191569909"},"_hasShrinkwrap":false}},"time":{"created":"2015-08-13T18:50:44.842Z","modified":"2025-09-17T08:46:49.353Z","1.0.0":"2015-08-13T18:50:44.842Z","1.1.0":"2015-10-01T15:48:55.709Z","2.0.0":"2017-01-23T11:51:32.929Z","3.0.0":"2018-04-12T12:07:10.832Z","4.0.0":"2019-04-26T06:54:03.079Z","4.1.0":"2020-01-16T11:05:44.670Z","5.0.0":"2020-10-20T17:23:38.860Z","6.0.0":"2021-11-05T18:28:44.958Z","7.0.0":"2025-09-17T08:46:49.146Z"},"bugs":{"url":"https://github.com/sindresorhus/round-to/issues"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"license":"MIT","homepage":"https://github.com/sindresorhus/round-to#readme","keywords":["round","number","decimal","places","ceil","floor","math","increment","precision"],"repository":{"type":"git","url":"git+https://github.com/sindresorhus/round-to.git"},"description":"Round a number to a specific number of decimal places: `1.234` → `1.2`","maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"readme":"# round-to\n\n> Round a number to a specific number of decimal places: `1.234` → `1.2`\n\n> [!TIP]\n> If you only need a string, use `number.toFixed(precision)`.\n\n## Install\n\n```sh\nnpm install round-to\n```\n\n## Usage\n\n```js\nimport {roundTo, roundToUp, roundToDown} from 'round-to';\n\nroundTo(1.234, 2);\n//=> 1.23\n\nroundToUp(1.234, 2);\n//=> 1.24\n\nroundToDown(1.234, 2);\n//=> 1.23\n```\n\nNumbers are rounded to a specific number of fractional digits. Specifying a negative `precision` will round to any number of places to the left of the decimal.\n\n```js\nroundTo(1234.56, -2);\n//=> 1200\n```\n\nSpecifying an infinite `precision` will assume infinite decimal places.\n\n```js\nroundTo(0.1231782638, Infinity);\n//=> 0.1231782638\n```\n\n## API\n\n### roundTo(number, precision, options?)\n\nRound the decimals with [`Math.round`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/round) by default.\n\nYou can specify different rounding rules using the `roundingRule` option. The default behavior rounds away from zero for 0.5 cases (traditional rounding), but you can use banker's rounding, always round up/down, or other rules.\n\n```js\n// Default behavior (away from zero)\nroundTo(5.5, 0);\n//=> 6\nroundTo(-5.5, 0);\n//=> -6\n\n// Banker's rounding (to nearest even)\nroundTo(5.5, 0, {roundingRule: 'toNearestOrEven'});\n//=> 6\nroundTo(4.5, 0, {roundingRule: 'toNearestOrEven'});\n//=> 4\n\n// Always round up (toward +∞)\nroundTo(5.2, 0, {roundingRule: 'up'});\n//=> 6\nroundTo(-5.2, 0, {roundingRule: 'up'});\n//=> -5\n```\n\n### roundToUp(number, precision)\n\nRound up the decimals with [`Math.ceil`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/ceil).\n\n### roundToDown(number, precision)\n\nRound down the decimals with [`Math.floor`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/floor).\n\n#### number\n\nType: `number`\n\nThe number to adjust.\n\n#### precision\n\nType: `number` *(Integer or Infinity)*\n\nThe number of decimal places.\n\n#### options\n\nType: `object`\n\n##### roundingRule\n\nType: `'toNearestOrAwayFromZero' | 'toNearestOrEven' | 'up' | 'down' | 'towardZero' | 'awayFromZero'`\\\nDefault: `'toNearestOrAwayFromZero'`\n\nThe rounding rule to use:\n\n- `'toNearestOrAwayFromZero'` - Round to the closest value; if two values are equally close, the one with greater magnitude is chosen (traditional rounding).\n- `'toNearestOrEven'` - Round to the closest value; if two values are equally close, the even one is chosen (banker's rounding).\n- `'up'` - Round toward +∞ (always round up).\n- `'down'` - Round toward -∞ (always round down).\n- `'towardZero'` - Round toward zero (truncate).\n- `'awayFromZero'` - Round away from zero.\n\nExamples:\n\n```js\nroundTo(5.5, 0, {roundingRule: 'toNearestOrEven'});\n//=> 6\nroundTo(4.5, 0, {roundingRule: 'toNearestOrEven'});\n//=> 4\n\nroundTo(-5.2, 0, {roundingRule: 'towardZero'});\n//=> -5\nroundTo(-5.8, 0, {roundingRule: 'towardZero'});\n//=> -5\n```\n","readmeFilename":"readme.md","users":{"preco21":true,"magomogo":true,"rocket0191":true}}