{"analyzedAt":"2022-07-05T08:35:39.868Z","collected":{"metadata":{"name":"@touch4it/currency-format","scope":"touch4it","version":"1.1.0","description":"Currency formatter","keywords":["currency","currency formatter","format","formatter","ISO 4217"],"date":"2022-02-23T16:07:31.488Z","author":{"name":"Touch4IT, s.r.o.","email":"hi@touch4it.com","url":"https://touch4it.com/"},"publisher":{"username":"vittore","email":"vsulak.svk@gmail.com"},"maintainers":[{"username":"w0k3","email":"npm@dreamy.sk"},{"username":"dusan.matejka","email":"dusan.matejka.dm@gmail.com"},{"username":"vittore","email":"vsulak.svk@gmail.com"}],"contributors":[{"name":"Viktor Sulak","email":"viktor.sulak@touch4it.com"}],"repository":{"type":"git","url":"git+https://github.com/touch4it/currency-format.git"},"links":{"npm":"https://www.npmjs.com/package/%40touch4it%2Fcurrency-format","homepage":"https://github.com/touch4it/currency-format","repository":"https://github.com/touch4it/currency-format","bugs":"https://github.com/touch4it/currency-format/issues"},"license":"MIT","devDependencies":{"eslint":"^8.9.0","jest":"^26.6.3"},"releases":[{"from":"2022-06-05T00:00:00.000Z","to":"2022-07-05T00:00:00.000Z","count":0},{"from":"2022-04-06T00:00:00.000Z","to":"2022-07-05T00:00:00.000Z","count":1},{"from":"2022-01-06T00:00:00.000Z","to":"2022-07-05T00:00:00.000Z","count":2},{"from":"2021-07-05T00:00:00.000Z","to":"2022-07-05T00:00:00.000Z","count":2},{"from":"2020-07-05T00:00:00.000Z","to":"2022-07-05T00:00:00.000Z","count":7}],"hasTestScript":true,"readme":"# Format currency output\n\n[![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/touch4it/currency-format/blob/master/lib/LICENSE.md)\n[![npm version](https://img.shields.io/npm/v/@touch4it/currency-format)](https://www.npmjs.com/package/@touch4it/currency-format)\n[![node version](https://img.shields.io/node/v/@touch4it/currency-format)](https://www.npmjs.com/package/@touch4it/currency-format)\n[![vulnerabilities](https://img.shields.io/snyk/vulnerabilities/npm/@touch4it/currency-format)](https://www.npmjs.com/package/@touch4it/currency-format)\n[![last commit](https://img.shields.io/github/last-commit/touch4it/currency-format)](https://github.com/touch4it/currency-format)\n\n## Installation\n\n```bash\n$ npm install --save @touch4it/currency-format\n```\n\n## API\n\n### `constructor(amount, [currency='USD'])`\n\nObject constructor\n\n__Options:__\n\n- `amount` (**required**) - Price amount\n- `currency` (*optional*, default: `USD`) - Price currency\n\n### `toString([decimals])`\n\nPrint string with correct number of decimal places\n\n__Options:__\n\n- `decimals` (*optional*, default: calculated from currency) - Decimal places in output\n\n__Return:__\n\nFormatted string\n\n### `add(amount)`\n\nAdd amount to previous amount\n\n__Options:__\n\n- `amount` (**required**) - Amount to be added\n\n__Return:__\n\nObject (this)\n\n### `subtract(amount)`\n\nSubtract amount from previous amount\n\n__Options:__\n\n- `amount` (**required**) - Amount to be subtracted\n\n__Return:__\n\nObject (this)\n\n### `vat(vatPercent)`\n\nCalculate VAT amount\n\n__Options:__\n\n- `vatPercent` (**required**) - Percent of VAT as number (e.g. `40` for 40%)\n\n__Return:__\n\nVAT amount as string with correct number of decimal places\n\n### `addVat(vatPercent)`\n\nAdd VAT amount to previous amount\n\n__Options:__\n\n- `vatPercent` (**required**) - Percent of VAT as number (e.g. `40` for 40%)\n\n__Return:__\n\nObject (this)\n\n## Example\n\nSee [tests](https://github.com/touch4it/currency-format/blob/master/lib/tests/index.test.js)\n\n## License\n\nMIT\n\n## Authors\n\n- [Touch4IT, s.r.o. contributors](https://github.com/touch4it/currency-format/graphs/contributors)"},"npm":{"downloads":[{"from":"2022-07-04T00:00:00.000Z","to":"2022-07-05T00:00:00.000Z","count":0},{"from":"2022-06-28T00:00:00.000Z","to":"2022-07-05T00:00:00.000Z","count":1},{"from":"2022-06-05T00:00:00.000Z","to":"2022-07-05T00:00:00.000Z","count":18},{"from":"2022-04-06T00:00:00.000Z","to":"2022-07-05T00:00:00.000Z","count":81},{"from":"2022-01-06T00:00:00.000Z","to":"2022-07-05T00:00:00.000Z","count":197},{"from":"2021-07-05T00:00:00.000Z","to":"2022-07-05T00:00:00.000Z","count":313}],"starsCount":0},"github":{"starsCount":0,"forksCount":0,"subscribersCount":6,"issues":{"count":1,"openCount":0,"distribution":{"3600":0,"10800":0,"32400":1,"97200":0,"291600":0,"874800":0,"2624400":0,"7873200":0,"23619600":0,"70858800":0,"212576400":0},"isDisabled":false},"contributors":[{"username":"vsulak","commitsCount":4},{"username":"iammatis","commitsCount":1}],"commits":[{"from":"2022-06-28T00:00:00.000Z","to":"2022-07-05T00:00:00.000Z","count":0},{"from":"2022-06-05T00:00:00.000Z","to":"2022-07-05T00:00:00.000Z","count":0},{"from":"2022-04-06T00:00:00.000Z","to":"2022-07-05T00:00:00.000Z","count":0},{"from":"2022-01-06T00:00:00.000Z","to":"2022-07-05T00:00:00.000Z","count":2},{"from":"2021-07-05T00:00:00.000Z","to":"2022-07-05T00:00:00.000Z","count":2}]},"source":{"files":{"readmeSize":2116,"testsSize":3544,"hasChangelog":true},"linters":["eslint"]}},"evaluation":{"quality":{"carefulness":0.9199999999999999,"tests":0.6,"health":1,"branding":0},"popularity":{"communityInterest":8,"downloadsCount":27,"downloadsAcceleration":-0.005156012176560115,"dependentsCount":0},"maintenance":{"releasesFrequency":0.9,"commitsFrequency":0.9,"openIssues":1,"issuesDistribution":1}},"score":{"final":0.6155185557595786,"detail":{"quality":0.8364556389013833,"popularity":0.041718031385430815,"maintenance":0.9999444374407507}}}