{"id":21161190,"url":"https://github.com/hasnep/roc-units","last_synced_at":"2026-02-08T13:03:05.878Z","repository":{"id":241015554,"uuid":"804058630","full_name":"Hasnep/roc-units","owner":"Hasnep","description":"📏 Type-safe units of measure in Roc","archived":false,"fork":false,"pushed_at":"2024-10-29T14:28:56.000Z","size":70,"stargazers_count":5,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-10-29T17:39:23.502Z","etag":null,"topics":["roc","roc-lang","units"],"latest_commit_sha":null,"homepage":"https://hasnep.github.io/roc-units","language":"Roc","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"upl-1.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Hasnep.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}},"created_at":"2024-05-21T21:54:01.000Z","updated_at":"2024-10-29T14:29:34.000Z","dependencies_parsed_at":null,"dependency_job_id":"a5cd3160-2b11-4295-87c0-e1999807441f","html_url":"https://github.com/Hasnep/roc-units","commit_stats":null,"previous_names":["hasnep/roc-units"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Hasnep%2Froc-units","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Hasnep%2Froc-units/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Hasnep%2Froc-units/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Hasnep%2Froc-units/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Hasnep","download_url":"https://codeload.github.com/Hasnep/roc-units/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243606954,"owners_count":20318314,"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":["roc","roc-lang","units"],"created_at":"2024-11-20T13:08:52.704Z","updated_at":"2026-02-08T13:03:05.821Z","avatar_url":"https://github.com/Hasnep.png","language":"Roc","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Roc Units\n\nType-safe units of measure in Roc.\n\n## Example\n\nFeet, inches and centimeters are all `Length`s, so they can all be added to and converted to each other.\n\n```roc\nheight = Quantity.feet 5 |\u003e Quantity.add (Quantity.inches 11)\nStdout.line! \"Taylor Swift is $(height |\u003e Quantity.toCentimeters |\u003e Num.toStr) centimeters tall.\"\n```\n\n```text\nTaylor Swift is 180.34 centimeters tall.\n```\n\nBut incompatible units cannot be used together.\n\n```roc\nisThisAKilometer = Quantity.kilograms 1 |\u003e Quantity.add (Quantity.meters 1)\n```\n\n```text\nThis 2nd argument to add has an unexpected type: ...\n```\n\nFor a list of all the supported units, see [the documentation](https://hasnep.github.io/roc-units).\n\n## Licence\n\nThis project is released under the [UPL licence](./LICENCE) and is partly based on the [elm-units](https://package.elm-lang.org/packages/ianmackenzie/elm-units/latest/) library, which is licenced under the [BSD 3-Clause License](./LICENCE-elm-units).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhasnep%2Froc-units","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhasnep%2Froc-units","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhasnep%2Froc-units/lists"}