{"id":19041942,"url":"https://github.com/writetome51/get-cautiously-rounded","last_synced_at":"2026-06-20T08:31:10.558Z","repository":{"id":122062402,"uuid":"151352079","full_name":"writetome51/get-cautiously-rounded","owner":"writetome51","description":"Avoids rounding errors in very large data sets","archived":false,"fork":false,"pushed_at":"2020-08-03T21:17:04.000Z","size":17,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-09-26T13:59:43.144Z","etag":null,"topics":["javascript","numbers","rounding","typescript"],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","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/writetome51.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"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}},"created_at":"2018-10-03T02:40:06.000Z","updated_at":"2020-08-03T21:17:07.000Z","dependencies_parsed_at":null,"dependency_job_id":"0c25af2d-2538-4eb7-ad98-80c386adbb86","html_url":"https://github.com/writetome51/get-cautiously-rounded","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/writetome51/get-cautiously-rounded","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/writetome51%2Fget-cautiously-rounded","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/writetome51%2Fget-cautiously-rounded/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/writetome51%2Fget-cautiously-rounded/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/writetome51%2Fget-cautiously-rounded/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/writetome51","download_url":"https://codeload.github.com/writetome51/get-cautiously-rounded/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/writetome51%2Fget-cautiously-rounded/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34563535,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-20T02:00:06.407Z","response_time":98,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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","numbers","rounding","typescript"],"created_at":"2024-11-08T22:33:28.375Z","updated_at":"2026-06-20T08:31:10.517Z","avatar_url":"https://github.com/writetome51.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# getCautiouslyRounded(number): number\n\nThis function avoids cumulative rounding errors only by changing rounding rules in  \none area -- when the fraction part of `number` is .5\n\n## Examples\n```js\ngetCautiouslyRounded(2.5); // --\u003e  2\n\ngetCautiouslyRounded(3.5); // --\u003e  4\n\ngetCautiouslyRounded(-2.5); // --\u003e  -2\n\ngetCautiouslyRounded(-3.5); // --\u003e  -4\n\n// In all other cases, it rounds the normal way you expect.\n\ngetCautiouslyRounded(2.7); // --\u003e  3\n\ngetCautiouslyRounded(-2.7); // --\u003e  -3\n\ngetCautiouslyRounded(3.2); // --\u003e  3\n```\n\n## Installation\n`npm i  @writetome51/get-cautiously-rounded`\n\n## Loading\n```js\nimport { getCautiouslyRounded }  from '@writetome51/get-cautiously-rounded';\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwritetome51%2Fget-cautiously-rounded","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwritetome51%2Fget-cautiously-rounded","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwritetome51%2Fget-cautiously-rounded/lists"}