{"id":22331061,"url":"https://github.com/rodrigobdz/percentage-diff","last_synced_at":"2025-03-26T07:10:55.688Z","repository":{"id":57322040,"uuid":"183056883","full_name":"rodrigobdz/percentage-diff","owner":"rodrigobdz","description":"Calculate percentage difference between two numbers","archived":false,"fork":false,"pushed_at":"2019-04-23T17:15:15.000Z","size":13,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-18T11:20:01.215Z","etag":null,"topics":["decrease","delta","increase","math-calculator","npm-module","numbers-comparison","percentage-calculator","percentage-change","yarn"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/percentage-diff","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/rodrigobdz.png","metadata":{"files":{"readme":"readme.md","changelog":"changelog.md","contributing":"contributing.md","funding":null,"license":"license","code_of_conduct":"code_of_conduct.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-04-23T16:42:17.000Z","updated_at":"2019-04-24T05:38:17.000Z","dependencies_parsed_at":"2022-08-25T22:42:15.109Z","dependency_job_id":null,"html_url":"https://github.com/rodrigobdz/percentage-diff","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rodrigobdz%2Fpercentage-diff","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rodrigobdz%2Fpercentage-diff/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rodrigobdz%2Fpercentage-diff/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rodrigobdz%2Fpercentage-diff/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rodrigobdz","download_url":"https://codeload.github.com/rodrigobdz/percentage-diff/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245605730,"owners_count":20643030,"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":["decrease","delta","increase","math-calculator","npm-module","numbers-comparison","percentage-calculator","percentage-change","yarn"],"created_at":"2024-12-04T04:09:33.181Z","updated_at":"2025-03-26T07:10:55.669Z","avatar_url":"https://github.com/rodrigobdz.png","language":"JavaScript","readme":"# percentage-diff [![Build Status](https://travis-ci.com/rodrigobdz/percentage-diff.svg?branch=master)](https://travis-ci.com/rodrigobdz/percentage-diff) [![codecov](https://codecov.io/gh/rodrigobdz/percentage-diff/badge.svg?branch=master)](https://codecov.io/gh/rodrigobdz/percentage-diff?branch=master)\n\n\u003e Calculate percentage difference between two numbers\n\n## Install\n\n```sh\n$ npm install percentage-diff\n```\n\n## Usage\n\n```js\nconst percentageDiff = require('percentage-diff');\n\npercentageDiff(50, 75);\n//=\u003e 50\npercentageDiff.toPercentage(50);\n//=\u003e 50%\npercentageDiff(45,35);\n//=\u003e -22.22\n```\n\n## API\n\n### percentageDiff(firstNr, secondNr)\n\n#### firstNr\n\nType: `number`\n\n#### secondNr\n\nType: `number`\n\n### percentageDiff.toPercentage(value)\n\n#### value\n\nType: `number`\n\n## Credits\n\n* [generator-lnm](https://github.com/rodrigobdz/generator-lnm) - Awesome node module generator\n\n## License\n\n[MIT](license) © [Rodrigo Bermudez Schettino](https://rodrigobdz.github.io)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frodrigobdz%2Fpercentage-diff","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frodrigobdz%2Fpercentage-diff","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frodrigobdz%2Fpercentage-diff/lists"}