{"id":8851720,"url":"https://github.com/purchasing-power-parity/purchasing-power-parity","last_synced_at":"2025-08-09T15:31:52.539Z","repository":{"id":38291111,"uuid":"108741284","full_name":"purchasing-power-parity/purchasing-power-parity","owner":"purchasing-power-parity","description":"💫  Make your products affordable for everyone around the world.","archived":false,"fork":false,"pushed_at":"2023-12-20T01:29:38.000Z","size":140,"stargazers_count":643,"open_issues_count":9,"forks_count":53,"subscribers_count":10,"default_branch":"master","last_synced_at":"2024-12-03T20:02:26.086Z","etag":null,"topics":["javascript","purchasing-power-parity"],"latest_commit_sha":null,"homepage":"https://purchasing-power-parity.com","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/purchasing-power-parity.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"rwieruch","patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":null}},"created_at":"2017-10-29T14:28:00.000Z","updated_at":"2024-11-19T23:20:13.000Z","dependencies_parsed_at":"2024-04-30T20:07:00.470Z","dependency_job_id":"c56a4549-aee0-4834-9d19-de7edc964cd6","html_url":"https://github.com/purchasing-power-parity/purchasing-power-parity","commit_stats":{"total_commits":32,"total_committers":4,"mean_commits":8.0,"dds":0.15625,"last_synced_commit":"afe9d8dfda11ac88ccc8eb71c5bd09135e798f55"},"previous_names":["purchasing-power-parity/purchasing-power-parity","rwieruch/purchasing-power-parity"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/purchasing-power-parity%2Fpurchasing-power-parity","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/purchasing-power-parity%2Fpurchasing-power-parity/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/purchasing-power-parity%2Fpurchasing-power-parity/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/purchasing-power-parity%2Fpurchasing-power-parity/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/purchasing-power-parity","download_url":"https://codeload.github.com/purchasing-power-parity/purchasing-power-parity/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228971360,"owners_count":17999859,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["javascript","purchasing-power-parity"],"created_at":"2024-04-30T20:01:38.502Z","updated_at":"2024-12-11T22:30:32.438Z","avatar_url":"https://github.com/purchasing-power-parity.png","language":"JavaScript","funding_links":["https://github.com/sponsors/rwieruch"],"categories":["TypeScript","JavaScript"],"sub_categories":[],"readme":"# Purchasing Power Parity\n\n[![Build Status](https://travis-ci.org/rwieruch/purchasing-power-parity.svg?branch=master)](https://travis-ci.org/rwieruch/purchasing-power-parity)\n\nNot everyone is able to pay for the default pricings of the western world. Online products should be made affordable for everyone around the world. This package is a simple way to make [Purchasing Power Parity](https://purchasing-power-parity.com) available in your browser. See how it could look like in your application for someone buying your product from another country:\n\n\u003cimg width=\"1276\" alt=\"screen shot 2017-11-02 at 08 40 54\" src=\"https://user-images.githubusercontent.com/2479967/32305725-a8186744-bfa9-11e7-9d58-a074c5b34982.png\"\u003e\n\n## How to use it?\n\n**Install:**\n\n`npm install purchasing-power-parity`\n\n**Use:**\n\n```js\nimport fetchPPP from 'purchasing-power-parity';\n\nlet originalPrice = 99.99;\nlet discountPrice;\n\nfetchPPP().then(response =\u003e {\n  discountPrice = response.ppp.pppConversionFactor * originalPrice;\n});\n```\n\nIf you don't want to use this library, you can also use the [API](https://api.purchasing-power-parity.com/?target=ID) directly where you are able to pass the country code yourself. Otherwise, this library will figure out the location of the user itself.\n\nAfter all, you can adjust your prices when the `pppConversionFactor` goes below 1 and add an optional banner for your customers to make them aware of it. What other information is in the returned PPP object?\n\n**ppp-object:**\n\n```js\n{\n  \"countryCodeIsoAlpha2\": \"AR\",\n  \"currenciesCountry\": {\n    \"ARS\": {\n      \"name\": \"Argentine peso\",\n      \"symbol\": \"$\"\n    }\n  },\n  \"countryCodeIsoAlpha3\": \"ARG\",\n  \"currencyMain\": {\n    \"exchangeRate\": 99.148857,\n    \"name\": \"Argentine peso\",\n    \"symbol\": \"$\"\n  },\n  \"ppp\": 26.526,\n  \"pppConversionFactor\": 0.2675371234990636\n}\n```\n\nThe `currencyMain.exchangeRate` and `ppp` property are used to compute the `pppConversionFactor`.\n\n## Limitations\n\n- runs only in the browser\n- takes only USD as baseline\n\n## Who uses PPP?\n\nThis node package was inspired by [Wes Bos](https://twitter.com/wesbos) who sells his courses with PPP. There are other people which make their products affordable to everyone around the world by using PPP. You can add your project/company/product/service/... to the list when you are using this package:\n\n- [Road to React](https://roadtoreact.com/)\n- ...\n\n## Contribution\n\nThe project is in an early stage, so please feel free to contribute to it. It works, but it could be more robust and improved. If you want to know how PPP works, you can read up this [short article](https://www.sapling.com/6218206/calculate-purchasing-power-parity). I would love to see you contributing to it:\n\n- create an Issue\n- discuss with maintainers and contributors about the issue\n- create a Pull Request if the issue should be solved\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpurchasing-power-parity%2Fpurchasing-power-parity","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpurchasing-power-parity%2Fpurchasing-power-parity","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpurchasing-power-parity%2Fpurchasing-power-parity/lists"}