{"id":22502864,"url":"https://github.com/r-unic/rbx-formatting","last_synced_at":"2026-02-13T22:03:36.397Z","repository":{"id":266370206,"uuid":"898179070","full_name":"R-unic/rbx-formatting","owner":"R-unic","description":"Utility functions for formatting numbers and parsing strings back into numbers for Roblox","archived":false,"fork":false,"pushed_at":"2025-03-21T22:28:54.000Z","size":39,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-09-19T05:04:02.286Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Luau","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/R-unic.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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,"zenodo":null}},"created_at":"2024-12-03T23:40:52.000Z","updated_at":"2025-03-21T22:28:57.000Z","dependencies_parsed_at":"2024-12-03T23:45:21.190Z","dependency_job_id":"61c8bb28-85bf-43d6-9e49-2878ea95813b","html_url":"https://github.com/R-unic/rbx-formatting","commit_stats":null,"previous_names":["r-unic/rbx-formatting"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/R-unic/rbx-formatting","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/R-unic%2Frbx-formatting","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/R-unic%2Frbx-formatting/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/R-unic%2Frbx-formatting/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/R-unic%2Frbx-formatting/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/R-unic","download_url":"https://codeload.github.com/R-unic/rbx-formatting/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/R-unic%2Frbx-formatting/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":276632900,"owners_count":25676999,"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","status":"online","status_checked_at":"2025-09-23T02:00:09.130Z","response_time":73,"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":[],"created_at":"2024-12-06T23:26:54.967Z","updated_at":"2025-09-23T19:15:41.658Z","avatar_url":"https://github.com/R-unic.png","language":"Luau","funding_links":[],"categories":[],"sub_categories":[],"readme":"# @rbxts/formatting\nUtility functions for formatting numbers and parsing strings back into numbers for Roblox\n\n## commaFormat\n\nPlaces commas between every three decimal points in `n`\n\n### Parameters\n\n*   `n` **([number][19] | [string][20])**\u0026#x20;\n\n### Examples\n\n```javascript\ncommaFormat(1000000) // 1,000,000\n```\n\nReturns **[string][20]**\u0026#x20;\n\n## abbreviate\n\nAbbreviates numbers larger than or equal to `threshold`\n\n### Parameters\n\n*   `n` **[number][19]**\u0026#x20;\n*   `threshold`   (optional, default `100_000`)\n*   `suffixes`   (optional, default `baseSuffixes`)\n\n### Examples\n\n```javascript\nabbreviate(1000000) // 1M\nabbreviate(1000000000000000000000) // 1Sx\n```\n\nReturns **[string][20]**\u0026#x20;\n\n## parseAbbreviatedNumber\n\nParses a number formatted by `abbreviate()` back into a number type\n\n### Parameters\n\n*   `suffixed` **[string][20]**\u0026#x20;\n*   `suffixes`   (optional, default `baseSuffixes`)\n\n### Examples\n\n```javascript\nparseAbbreviatedNumber(\"1B\") // 1000000000\n```\n\nReturns **[number][19]**\u0026#x20;\n\n## toSeconds\n\nTakes a remaining time string and converts it to the amount of time it represents in seconds.\n\n### Parameters\n\n*   `time` **[string][20]**\u0026#x20;\n\n### Examples\n\n```javascript\ntoSeconds(\"10m 20s\") // 620\n```\n\nReturns **[number][19]**\u0026#x20;\n\n## toRemainingTime\n\nTakes a time in seconds and converts it to a remaining time string\n\n### Parameters\n\n*   `seconds` **[number][19]**\u0026#x20;\n*   `secondsFormat`   (optional, default `\"%ds\"`)\n*   `minutesFormat`   (optional, default `\"%dm\"`)\n*   `hoursFormat`   (optional, default `\"%dh\"`)\n*   `daysFormat`   (optional, default `\"%dd\"`)\n\n### Examples\n\n```javascript\ntoRemainingTime(310) // 5m 10s\n```\n\nReturns **[string][20]**\u0026#x20;\n\n## toLongRemainingTime\n\nTakes a time in seconds and converts it to a long remaining time string\n\n### Parameters\n\n*   `seconds` **[number][19]**\u0026#x20;\n\n### Examples\n\n```javascript\ntoLongRemainingTime(3690) // 01:01:30\n```\n\nReturns **[string][20]**\u0026#x20;\n\n[1]: #commaformat\n\n[2]: #parameters\n\n[3]: #examples\n\n[4]: #abbreviate\n\n[5]: #parameters-1\n\n[6]: #examples-1\n\n[7]: #parseabbreviatednumber\n\n[8]: #parameters-2\n\n[9]: #examples-2\n\n[10]: #toseconds\n\n[11]: #parameters-3\n\n[12]: #examples-3\n\n[13]: #toremainingtime\n\n[14]: #parameters-4\n\n[15]: #examples-4\n\n[16]: #tolongremainingtime\n\n[17]: #parameters-5\n\n[18]: #examples-5\n\n[19]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number\n\n[20]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fr-unic%2Frbx-formatting","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fr-unic%2Frbx-formatting","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fr-unic%2Frbx-formatting/lists"}