{"_id":"@alvarocastro/round","_rev":"1-fab91df6904f8d06b7b1aeed341c9e39","name":"@alvarocastro/round","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"@alvarocastro/round","version":"1.0.0","description":"Round values up to an amount of decimals","main":"index.js","scripts":{"test":"xo && nyc ava","coverage":"nyc report --reporter=text-lcov | coveralls"},"repository":{"type":"git","url":"git+https://github.com/alvarocastro/round.git"},"keywords":["round","math","floating point"],"author":{"name":"Alvaro Castro"},"license":"MIT","bugs":{"url":"https://github.com/alvarocastro/round/issues"},"engines":{"node":"10 || >=12"},"homepage":"https://github.com/alvarocastro/round#readme","devDependencies":{"ava":"^3.5.2","coveralls":"^3.0.11","nyc":"^15.0.0","xo":"^0.28.1"},"gitHead":"fb51aa8bf54f6fe56d9517108541981dc5791816","_id":"@alvarocastro/round@1.0.0","_nodeVersion":"13.7.0","_npmVersion":"6.14.4","dist":{"integrity":"sha512-DogjPKLDbpc0vQgFyKI9E1mdRlOYm8xI14eseaW9AK8pe8TGFu/yaasmf3RLLqRaCiQ1EAvQR5w1b/HiHLwxJQ==","shasum":"dbeee6434a3d71aa6e4ae579c64b486f244f1c32","tarball":"https://registry.npmjs.org/@alvarocastro/round/-/round-1.0.0.tgz","fileCount":7,"unpackedSize":5107,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJegms2CRA9TVsSAnZWagAANj0P/ioRqgQAwDOxtfzpGhu4\n6RbLEUD+Z8ahkYb30Mk0v1hk9ssUpbY3z5wUnwdZEehTtPIB3070pO9ygQQF\nwWAxj7+7QJ3ppXTTOcZkihW9BsP/5FD0VgH6sVbU/nL7rscKiq+gaIUxigt1\nfvt6ueoS0586ZcBqQLnLqYmA+Q+NuKQW/KJXdfECY7eWKSyMDpRJFDgjqNHP\n3H7k9IPPoH6XOye0yNbkEpnnBgODc6WwAdq+vbpDsemrS9Zebi2SWpU2SnPC\nge8Q3t2Bq6185XDp8Ey+taXX+S+ALcYc2Bqi37d7G9wIIwFbymghSIaibu5Y\neR8tsL7ZwCBgBwBktF2DkKYkaNCAQQWhDhuhg5MRxnwclkfp9WIaQVyaIWhm\nB2/zWIoYvDxp74Fy5e2w9cMAgHhIAcTPyDQBOcZhHqbfA9Vz5J06WjaahMjy\ncvIteexTY9roDsoSZfofjJK/j6X6jpfyIWt/SwH7m9OS+LmzLZqVxTjLIRfC\nSA2IR90/ztnoqCys5eUF/a2GgkD6FEdffCo80LhdRxjMOLXuOysv4EJnyM0G\nfPty8zo6CDHkERsXFPbXtFzltmnd7C9+NTWyyOHRhq4XpnYlbBmbAMJJF1Xc\neerwTMebBwUR/OuJ1XhOdrVQbRW47unDfiUH5piquuAtb/57o5e21rqaoj+r\nBRgZ\r\n=Coq6\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDbKscRQnEGFjfAQDCLqL67GzHakBRSD8XFS5rPIN5uIgIgXkKvFmcm4xbn4Ai8aDg2U3moPU6LKpSJEAgX2mvUoYg="}]},"maintainers":[{"name":"alvarocastro","email":"moltar89@gmail.com"}],"_npmUser":{"name":"alvarocastro","email":"moltar89@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/round_1.0.0_1585605429731_0.3794468016966559"},"_hasShrinkwrap":false}},"time":{"created":"2020-03-30T21:57:09.509Z","1.0.0":"2020-03-30T21:57:09.869Z","modified":"2022-04-04T13:41:45.038Z"},"maintainers":[{"name":"alvarocastro","email":"moltar89@gmail.com"}],"description":"Round values up to an amount of decimals","homepage":"https://github.com/alvarocastro/round#readme","keywords":["round","math","floating point"],"repository":{"type":"git","url":"git+https://github.com/alvarocastro/round.git"},"author":{"name":"Alvaro Castro"},"bugs":{"url":"https://github.com/alvarocastro/round/issues"},"license":"MIT","readme":"# Round\n[![NPM](https://img.shields.io/npm/v/@alvarocastro/round.svg)](https://www.npmjs.com/package/@alvarocastro/round)\n[![Build Status](https://travis-ci.org/alvarocastro/round.svg?branch=master)](https://travis-ci.org/alvarocastro/round)\n[![codebeat badge](https://codebeat.co/badges/9451ded5-f5f8-44e1-9894-d627b2fc1a7c)](https://codebeat.co/projects/github-com-alvarocastro-round-master)\n[![Coverage Status](https://coveralls.io/repos/github/alvarocastro/round/badge.svg?branch=master)](https://coveralls.io/github/alvarocastro/round?branch=master)\n[![XO code style](https://img.shields.io/badge/code_style-XO-5ed9c7.svg)](https://github.com/xojs/xo)\n\nRound values up to an amount of decimals, avoiding the floating point weirdness of JavaScript.\n\n- [Install](#install)\n- [Usage](#usage)\n\n## Install\n\n```bash\nnpm install @alvarocastro/round\n```\n\n## Usage\n\n```js\nconst round = require('@alvarocastro/round');\n\nround(1.005);\n// => 1.01\nround(2.2222, 1);\n// => 1.1\nround(3, 5);\n// => 3\n```\n\n### round(number[, decimals = 2])\n\nReturns the value rounded up to a given amout of decimals.\n\n#### number\n\nType: `Number`\n\nValue to round.\n\n#### decimals\n\nType: `Number`<br>\nDefault: 2\n\nThe amount of decimals to round the number to.\n","readmeFilename":"README.md"}