{"analyzedAt":"2022-09-30T02:57:47.739Z","collected":{"metadata":{"name":"country-to-currency","scope":"unscoped","version":"1.0.6","description":"Map country codes (ISO 3166-1 alpha-2) to their default currency codes (ISO 4217)","keywords":["country","currency","code","iso-3166","iso-4217","locale","i18n","javascript","typescript","browser","nodejs","denojs"],"date":"2022-09-29T02:55:55.494Z","author":{"name":"Thiago Delgado Pinto","email":"thiago-dp@bol.com.br"},"publisher":{"username":"thiagodp","email":"thiago_dp@yahoo.com.br"},"maintainers":[{"username":"thiagodp","email":"thiago_dp@yahoo.com.br"}],"repository":{"type":"git","url":"git://github.com/thiagodp/country-to-currency.git"},"links":{"npm":"https://www.npmjs.com/package/country-to-currency","homepage":"https://github.com/thiagodp/country-to-currency","repository":"https://github.com/thiagodp/country-to-currency","bugs":"https://github.com/thiagodp/country-to-currency/issues"},"license":"MIT","devDependencies":{"country-list":"latest","currency-codes":"latest","microbundle":"^0.15.1"},"releases":[{"from":"2022-08-31T00:00:00.000Z","to":"2022-09-30T00:00:00.000Z","count":2},{"from":"2022-07-02T00:00:00.000Z","to":"2022-09-30T00:00:00.000Z","count":2},{"from":"2022-04-03T00:00:00.000Z","to":"2022-09-30T00:00:00.000Z","count":3},{"from":"2021-09-30T00:00:00.000Z","to":"2022-09-30T00:00:00.000Z","count":4},{"from":"2020-09-30T00:00:00.000Z","to":"2022-09-30T00:00:00.000Z","count":5}],"hasTestScript":true,"hasSelectiveFiles":true,"readme":"[![npm (tag)](https://img.shields.io/npm/v/country-to-currency?color=green&label=NPM&style=for-the-badge)](https://github.com/thiagodp/country-to-currency/releases)\r\n[![License](https://img.shields.io/npm/l/country-to-currency.svg?style=for-the-badge&color=green)](https://github.com/thiagodp/country-to-currency/blob/master/LICENSE.txt)\r\n[![npm](https://img.shields.io/npm/dt/country-to-currency?style=for-the-badge&color=green)](https://www.npmjs.com/package/country-to-currency)\r\n\r\n# country-to-currency\r\n\r\n> Maps country codes ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements)) to their default currency codes ([ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#Active_codes)).\r\n\r\n⚡ Just 2.3 KB (unzipped), no external dependencies.\r\n\r\n🎯 Work with browsers, NodeJS, and DenoJS. JavaScript and TypeScript.\r\n\r\n## Install\r\n\r\n```shell\r\nnpm i country-to-currency\r\n```\r\n\r\n## Usage\r\n\r\nThis library exports a default object that maps country codes to currency codes.\r\n\r\n[Available formats]() include [UMD](https://github.com/umdjs/umd) (therefore [AMD](https://github.com/amdjs/amdjs-api/wiki/AMD) and [CommonJS](http://wiki.commonjs.org/wiki/CommonJS)) and\r\n[ESM](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules).\r\n\r\n### Browser - without installing anything\r\n\r\nGlobal:\r\n```html\r\n<script crossorigin src=\"https://unpkg.com/country-to-currency\" ></script>\r\n<script>\r\n  console.log( countryToCurrency ); // {AF: \"AFN\", AX: \"EUR\", ... }\r\n  console.log( countryToCurrency[ 'US' ] ); // USD\r\n  console.log( countryToCurrency[ 'DE' ] ); // EUR\r\n  console.log( countryToCurrency[ 'BR' ] ); // BRL\r\n</script>\r\n```\r\n\r\nESM:\r\n```html\r\n<script type=\"module\" >\r\n  import countryToCurrency from \"https://unpkg.com/country-to-currency/index.esm.js\";\r\n  console.log( countryToCurrency[ 'US' ] ); // USD\r\n</script>\r\n```\r\n\r\n### NodeJS\r\n```js\r\nconst countryToCurrency = require( 'country-to-currency' );\r\nconsole.log( countryToCurrency[ 'US' ] ); // USD\r\n```\r\n\r\n### DenoJS\r\n\r\n```js\r\nimport countryToCurrency from \"https://unpkg.com/country-to-currency/index.esm.js\";\r\nconsole.log( countryToCurrency[ 'US' ] ); // USD\r\n```\r\n\r\n## Notes\r\n\r\n- All the countries included - currently `249`.\r\n- For `Antarctica` (`AQ`), the currency `USD` is being assumed.\r\n- For `Palestine` (`PS`), the currency `ILS` is being assumed.\r\n- For `South Korea` (`KR`), the currency `KRW` is being assumed.\r\n- For `Switzerland` (`CH`), the currenty `CHF` is being assumed.\r\n- For `Chile` (`CLF`), the currency `CLP` is being assumed.\r\n- For `Uruguay` (`UY`), the currency `UYU` is being assumed.\r\n\r\n> _Suggestions? Please [open an Issue](https://github.com/thiagodp/country-to-currency/issues/new)._\r\n\r\n## License\r\n\r\nThis library is inspired by Michael Rhodes' [currency-code-map](https://github.com/michaelrhodes/currency-code-map). The current project adds new currencies, offers support to browsers and DenoJS, updates dependencies and provide new internal scripts.\r\n\r\n[MIT](LICENSE.txt) © [Thiago Delgado Pinto](https://github.com/thiagodp)"},"npm":{"downloads":[{"from":"2022-09-29T00:00:00.000Z","to":"2022-09-30T00:00:00.000Z","count":0},{"from":"2022-09-23T00:00:00.000Z","to":"2022-09-30T00:00:00.000Z","count":5653},{"from":"2022-08-31T00:00:00.000Z","to":"2022-09-30T00:00:00.000Z","count":27125},{"from":"2022-07-02T00:00:00.000Z","to":"2022-09-30T00:00:00.000Z","count":63542},{"from":"2022-04-03T00:00:00.000Z","to":"2022-09-30T00:00:00.000Z","count":111013},{"from":"2021-09-30T00:00:00.000Z","to":"2022-09-30T00:00:00.000Z","count":161351}],"starsCount":0},"github":{"starsCount":13,"forksCount":4,"subscribersCount":2,"issues":{"count":8,"openCount":0,"distribution":{"3600":0,"10800":0,"32400":2,"97200":0,"291600":0,"874800":1,"2624400":1,"7873200":1,"23619600":2,"70858800":1,"212576400":0},"isDisabled":false},"contributors":[{"username":"thiagodp","commitsCount":22},{"username":"davidmh","commitsCount":1}],"commits":[{"from":"2022-09-23T00:00:00.000Z","to":"2022-09-30T00:00:00.000Z","count":3},{"from":"2022-08-31T00:00:00.000Z","to":"2022-09-30T00:00:00.000Z","count":3},{"from":"2022-07-02T00:00:00.000Z","to":"2022-09-30T00:00:00.000Z","count":4},{"from":"2022-04-03T00:00:00.000Z","to":"2022-09-30T00:00:00.000Z","count":9},{"from":"2021-09-30T00:00:00.000Z","to":"2022-09-30T00:00:00.000Z","count":11}]},"source":{"files":{"readmeSize":3004,"testsSize":0},"badges":[{"urls":{"original":"https://img.shields.io/npm/l/country-to-currency.svg?color=green","shields":"https://img.shields.io/npm/l/country-to-currency.svg","content":"https://img.shields.io/npm/l/country-to-currency.json"},"info":{"service":"npm","type":"license","modifiers":{"type":"l"}}}]}},"evaluation":{"quality":{"carefulness":0.7899999999999999,"tests":0,"health":1,"branding":0.15},"popularity":{"communityInterest":21,"downloadsCount":21180.666666666668,"downloadsAcceleration":159.1976217656012,"dependentsCount":0},"maintenance":{"releasesFrequency":1,"commitsFrequency":0.9,"openIssues":1,"issuesDistribution":0.9}},"score":{"final":0.5671126442453078,"detail":{"quality":0.6092566371384354,"popularity":0.09819548270327702,"maintenance":0.9999063833075152}}}