{"_id":"@annapawl/math_library","_rev":"2-fa3b3dfa740a8f91bb8937fce3c11f49","name":"@annapawl/math_library","dist-tags":{"latest":"2.0.0"},"versions":{"1.0.0":{"name":"@annapawl/math_library","version":"1.0.0","description":"![GitHub repo size](https://img.shields.io/github/repo-size/AnniePawl/JS-Math-Library?style=flat-square)</br>","main":"index.js","directories":{"test":"tests"},"scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/AnniePawl/JS-Math-Library.git"},"author":"","license":"ISC","bugs":{"url":"https://github.com/AnniePawl/JS-Math-Library/issues"},"homepage":"https://github.com/AnniePawl/JS-Math-Library#readme","gitHead":"0c95a01d5d2e5256cd9b06c1986718e6aa46472c","_id":"@annapawl/math_library@1.0.0","_nodeVersion":"8.11.1","_npmVersion":"6.13.1","dist":{"integrity":"sha512-xhZDzgxMW5SFI7fuh+bLN6fkgwxZ7AkZs7uawkwQMHh/uuimm0I920Lyg0ztupHOGO3E+2aW50QwOLGt3tDPWw==","shasum":"9dca5f0bbf8ba2dd4f663ad4a542b975d718fdb1","tarball":"https://registry.npmjs.org/@annapawl/math_library/-/math_library-1.0.0.tgz","fileCount":4,"unpackedSize":6170,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd0v0ICRA9TVsSAnZWagAAZ6sQAJo1nhHqBXw9m1qE3O6e\n61qUYEcLt0LZnh6/rXyPLXqYkWFwiSgkyTYiyhTdTVusK07I4DoWEOBj+4sn\nvXt4zOuDKZ3SLEwgv4QSYpYAhRsBtI42lblWx1DhDX3EQXxSkxAJ2stTEBqI\nT1bBIaO3wltvnCqA88Q/PgR1+U7Bj9lDZqUvzcOScZHScmY/BTrUBisuDWOi\n+vAL2mrrtGO3aJ6fPRylF3ABjZ5xKKyDuHJUPgAwchLknqWe19Gk09cscr5J\nfJflJrezS3obi3IcuqncpstJ3xs6srIe0wlwJAP0A6nwJAtEvxN5pHB6F6eV\nNSNkA/JA8+pGQpfzQ2c4n1PT0CdOn2xmATirrtMUZ8bXoowdfjw08lQTBjM2\nx6cjmso8laUcWZoa8t3f48l27C/qpyiQrrJfBgvilo2WnPt5W6UozSL6IQeV\nOXDEDs7bJEgHSFZRM0D5mfwJsE+8mBWqiBAYf/YMgWsohoEpJQBh4MPEm8Uu\nQXRKeltri8dMFzf3gCYq+XpV8RFj+o+mSP2JVp92tpRcKi/Jgq1tgKR8nyK3\nDcyMM0m3rJaP3sgydds0lP9DxA/yTaElx5uj1p1tvXRK6jIO2KC7QXzJWCD9\nTNDGxE8AOG24UfQlUqOXVOfFGWZITnxrfJrkrsvE/ffiJ0lN2+oAvM0PgypL\nKmSY\r\n=8OGf\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDTRhKtnaKvEk1IbVv45ZbMSjQ/DbcK3mCGWP39Kej3jwIhAISugf/MbQCgoPIfAVVRHXfqDKd72CeTpstzjbQUt8vY"}]},"maintainers":[{"name":"annapawl","email":"annampawl@gmail.com"}],"_npmUser":{"name":"annapawl","email":"annampawl@gmail.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/math_library_1.0.0_1574108424504_0.9379095231734471"},"_hasShrinkwrap":false},"2.0.0":{"name":"@annapawl/math_library","version":"2.0.0","description":"![GitHub repo size](https://img.shields.io/github/repo-size/AnniePawl/JS-Math-Library?style=flat-square)</br>","main":"index.js","directories":{"test":"tests"},"scripts":{"test":"jest","coveralls":"jest --coverage --coverageReporters=text-lcov | coveralls"},"repository":{"type":"git","url":"git+https://github.com/AnniePawl/JS-Math-Library.git"},"author":"","license":"ISC","bugs":{"url":"https://github.com/AnniePawl/JS-Math-Library/issues"},"homepage":"https://github.com/AnniePawl/JS-Math-Library#readme","devDependencies":{"coveralls":"^3.0.9","jest":"^24.9.0"},"gitHead":"842b32d3b79bfd7faa9ba0486cb04e0f20d7650d","_id":"@annapawl/math_library@2.0.0","_nodeVersion":"8.11.1","_npmVersion":"6.13.1","dist":{"integrity":"sha512-xFEiLFPG+wMxfHL3XNW+E4GbnNY229Km2uLn4n2d6k9rUhe17Lar813ITXKMr9UfXYVPifzLydKqxmx1eoz2Bg==","shasum":"7228f100ca26cf3a010e185f0bdfa8b65e643967","tarball":"https://registry.npmjs.org/@annapawl/math_library/-/math_library-2.0.0.tgz","fileCount":17,"unpackedSize":70408,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd6YPpCRA9TVsSAnZWagAAQM0P/RxNrJv3IO3W4ve9Orqp\nE7ZQM4ZYNJDfwO5gCOoCX340IWP7/4/T0Bw5jMuiUOMOoL9W/FDM533enAVp\nS4OYTduV1e5uGC4WFc2lappFmi3Ui85AaW98W/gsMsjV5reE3OnPKRdFzFig\nfGvK4c6h1E2gFn2Z6Ya3vIK89BvquTmfWVRzMXViOJtjEF9dd7kseznN4g8d\ngrU7sZcKJ+6fIWWJgCxrXFSzKApO0P1KQvFovZ8dt/XHdP1YMU3ruNpVapgT\nia0PZb2M7DoDJg/BAsFV2ISUhEL2taX8HwNjOkARGOdG9W68MVhX0YNSO5B0\n6QVRfhhDaqSrD59oNVavTOPby2Eew8Z7qUdpaTx5a7Xvt1etCQD01dzbsNP3\nbWxBQLOWvaH0UrXd4aqjdY0LhMnQ5nFWNKnWj/10rbIympKdnKv5JHaqLX2M\nlvz7lKwOcRLAL6eLdMExfIY9OFB+kd6EbNGMxy2ggqTYZZspBKP5v/K7jkUg\n2MmwLQ/xMYp58kMjinZqheRQSvwjHB5Ckd/u4J4FNqcz9OkUeDWEEv3kJjWc\nBLXFeckkRx+aYK/V2sVtMK5rasPOIhZ5QMmCa/WhAU9BpF1r0UjQAp7Tgc2Z\nl+PuwuNtwzIschkxCatpqd68JTE4h1M14LnJnZaWNjxgC/shC9afUn0vAXw0\n+xj2\r\n=Umlz\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHtu8pVF5JcCgXt0xNxLbwoJapTTpwHBE3w3FhY4NEA+AiBLHKZBHUtLfJioQKkoifCPymRaP4oL0l+LEHZTLjVaxg=="}]},"maintainers":[{"name":"annapawl","email":"annampawl@gmail.com"}],"_npmUser":{"name":"annapawl","email":"annampawl@gmail.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/math_library_2.0.0_1575584744912_0.6367425026873301"},"_hasShrinkwrap":false}},"time":{"created":"2019-11-18T20:20:24.274Z","1.0.0":"2019-11-18T20:20:24.627Z","modified":"2022-04-04T14:14:04.901Z","2.0.0":"2019-12-05T22:25:45.086Z"},"maintainers":[{"name":"annapawl","email":"annampawl@gmail.com"}],"description":"![GitHub repo size](https://img.shields.io/github/repo-size/AnniePawl/JS-Math-Library?style=flat-square)</br>","homepage":"https://github.com/AnniePawl/JS-Math-Library#readme","repository":{"type":"git","url":"git+https://github.com/AnniePawl/JS-Math-Library.git"},"bugs":{"url":"https://github.com/AnniePawl/JS-Math-Library/issues"},"license":"ISC","readme":"# JavaScript Math Library \n![GitHub repo size](https://img.shields.io/github/repo-size/AnniePawl/JS-Math-Library?style=flat-square)\n![npm](https://img.shields.io/npm/v/@annapawl/math_library?style=flat-square)\n[![Build Status](https://travis-ci.com/AnniePawl/JS-Math-Library.svg?branch=master)](https://travis-ci.com/AnniePawl/JS-Math-Library)\n[![Coverage Status](https://coveralls.io/repos/github/AnniePawl/JS-Math-Library/badge.svg?branch=master)](https://coveralls.io/github/AnniePawl/JS-Math-Library?branch=master)\n</br>\n\nThis is a lightweight JavaScript library that extends the functionality of the number object. </br>\n\n### Getting Started\nRun the following command in your project folder: <br/>\n```\nnpm install @annapawl/math_library --save\n``` \nThen add this to your index.js file <br/>\n```\nrequire('@annapawl/src/math_library')\n```\n\n## Golden Ratio \n**goldenRatio()** </br>\nThis function returns the golden ratio</br>\n`Number.goldenRatio()` &#8594; 1.61803398875\n\n## Rounding Methods\n**round()** </br>\nThis method rounds a specified number</br> \n`'9.99.round()` &#8594; 10\n\n**roundDown()** </br>\nThis method rounds a specified number **down**</br> \n`'9.99.roundDown()` &#8594; 9\n\n**roundUp()** </br>\nThis method rounds a specified number **up**</br> \n`'9.2.roundUp()` &#8594; 10\n\n## Degrees ↔ Radians \n**degToRad(n)** </br> \nThis methods converts degrees to radians </br>\n`45.degToRad()`&#8594; 0.785\n\n**radToDeg(n)** </br> \nThis methods converts radians to degrees </br>\n`.785.RadTodeg()`&#8594; 44.977\n\n## Money Methods\n**toDollars(amount)** </br> \nThis methods takes in a numeric value and returns a string behinning with '$' and rounded to two decimal palces </br>\n`3.9.toDollars()`&#8594; '$3.90' \n\n**plusTax(rate)** </br> \nThis methods takes in a numeric value and returns the amount with tax </br>\n`10.plusTax(.2)`&#8594; '$12' \n\n**plusInterest(total, year, rate)** </br> \nThis methods calculates interests over a specified timeline </br>\n`Number.plusInterest(100,2,2)`&#8594; 104.04 \n\n**mortgage(principal, year, rate)** </br> \nThis methods calculates mortgage </br>\n`Number.mortgage(10,5,10)`&#8594; 100.00\n\n## Random Methods\n**random(n)** </br> \nThis method returns an integer between 0 and n-1 </br> \n`'random(10)` &#8594; 8\n\n**randomRange(min,max)** </br> \nThis method returns an integer between specified min and max </br> \n`'randomRange(50,100)` &#8594; 71\n\n**randomColor()** </br> \nThis method returns a random hex value </br> \n`'randomColor()` &#8594; 8a7f43\n\n\n## Test Coverage \n```\nnpx jest --coverage\n```\n----------|----------|----------|----------|----------|-------------------|\nFile      |  % Stmts | % Branch |  % Funcs |  % Lines | Uncovered Line #s |\n----------|----------|----------|----------|----------|-------------------|\nAll files |      100 |      100 |      100 |      100 |                   |\n index.js |      100 |      100 |      100 |      100 |                   |\n----------|----------|----------|----------|----------|-------------------|\n\n","readmeFilename":"README.md"}