{"id":19042016,"url":"https://github.com/writetome51/get-rounded-up-down","last_synced_at":"2026-05-18T14:09:59.478Z","repository":{"id":122062418,"uuid":"151348498","full_name":"writetome51/get-rounded-up-down","owner":"writetome51","description":"3 functions for rounding floats to integers","archived":false,"fork":false,"pushed_at":"2021-03-24T04:53:43.000Z","size":57,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-11-12T16:25:54.125Z","etag":null,"topics":["ceil","floor","javascript","javascript-library","math","numbers","round","rounding","typescript"],"latest_commit_sha":null,"homepage":"","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/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-03T01:57:23.000Z","updated_at":"2021-03-24T04:53:45.000Z","dependencies_parsed_at":null,"dependency_job_id":"74b60fd7-df4d-4eac-8a22-86d3dbdd2b6e","html_url":"https://github.com/writetome51/get-rounded-up-down","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/writetome51/get-rounded-up-down","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/writetome51%2Fget-rounded-up-down","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/writetome51%2Fget-rounded-up-down/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/writetome51%2Fget-rounded-up-down/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/writetome51%2Fget-rounded-up-down/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/writetome51","download_url":"https://codeload.github.com/writetome51/get-rounded-up-down/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/writetome51%2Fget-rounded-up-down/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33180399,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-18T09:27:30.708Z","status":"ssl_error","status_checked_at":"2026-05-18T09:27:28.300Z","response_time":71,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["ceil","floor","javascript","javascript-library","math","numbers","round","rounding","typescript"],"created_at":"2024-11-08T22:33:56.894Z","updated_at":"2026-05-18T14:09:59.455Z","avatar_url":"https://github.com/writetome51.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# getRounded(num): number\n\nAvoids cumulative rounding errors only by changing rounding rules when  \nthe fraction part of `num` is `.5` :  \n\u003cul\u003e  \n    \u003cli\u003eIf \u003ccode\u003enum\u003c/code\u003e's whole number is even, \u003ccode\u003enum\u003c/code\u003e is rounded toward zero.\u003c/li\u003e\n    \u003cli\u003eIf \u003ccode\u003enum\u003c/code\u003e's whole number is odd, \u003ccode\u003enum\u003c/code\u003e is rounded away from zero.\u003c/li\u003e\n \u003c/ul\u003e\n\n# getRoundedDown(num): number\n\nBehaves same as `Math.floor()` .\n \n# getRoundedUp(num): number\n\nBehaves same as `Math.ceil()` .\n\nFor all 3 functions, `num` must be a finite number of type 'number'.\n\n\n## Installation\n\n`npm i  @writetome51/get-rounded-up-down`\n\n## Loading\n```js\nimport { getRounded, getRoundedDown, getRoundedUp } \n    from '@writetome51/get-rounded-up-down';\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwritetome51%2Fget-rounded-up-down","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwritetome51%2Fget-rounded-up-down","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwritetome51%2Fget-rounded-up-down/lists"}