{"id":24678976,"url":"https://github.com/evinism/typed-si","last_synced_at":"2026-05-05T14:03:13.130Z","repository":{"id":47113465,"uuid":"515416059","full_name":"evinism/typed-si","owner":"evinism","description":null,"archived":false,"fork":false,"pushed_at":"2022-08-10T07:05:41.000Z","size":103,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-08-20T00:30:20.517Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","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/evinism.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}},"created_at":"2022-07-19T03:06:06.000Z","updated_at":"2022-07-20T06:44:38.000Z","dependencies_parsed_at":"2022-08-12T13:11:40.656Z","dependency_job_id":null,"html_url":"https://github.com/evinism/typed-si","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/evinism/typed-si","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/evinism%2Ftyped-si","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/evinism%2Ftyped-si/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/evinism%2Ftyped-si/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/evinism%2Ftyped-si/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/evinism","download_url":"https://codeload.github.com/evinism/typed-si/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/evinism%2Ftyped-si/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32652478,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-05T11:29:49.557Z","status":"ssl_error","status_checked_at":"2026-05-05T11:29:48.587Z","response_time":54,"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":[],"created_at":"2025-01-26T13:19:39.965Z","updated_at":"2026-05-05T14:03:13.108Z","avatar_url":"https://github.com/evinism.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# `typed-si`: Strongly typed physical units\n![Node.js](https://github.com/evinism/typed-si/actions/workflows/node.js.yml/badge.svg) \n[![npm version](https://img.shields.io/npm/v/typed-si.svg?style=flat)](https://www.npmjs.com/package/typed-si)\n\nInstallation via `npm i typed-si`\n\n`typed-si` is a typescript library for working with si-based phyisical quantities and measures with strong type safety guarantees.\n\n## Basic usage:\n\n```ts\nimport {Quantity, feet, kilo, newtons, atmospheres} from 'typed-si';\n\nconst sqft = Quantity.of(50, feet.squared());\nconst force = Quantity.of(10, kilo(newtons));\nconsole.log(`Atmospheres: ${force.over(sqft).in(atmospheres)}`)\n```\n\n## Rational by Default\nAll quantities in `typed-si` use rationals by default under the hood, leading to reasonable conversion with minimal loss of precision.\n\n## Aliases, Aliases, Aliases\n`typed-si` has a lot of aliases for things to improve readability. They behave identically and are often the same function instance. \n\n```js\n// Aliasing of singular and plurals\nQuantity.of(1, mile).in(meters);\n\n// Aliasing of unit and quantity division.\nQuantity.of(60, miles.per(hour));\nQuantity.of(60, miles.div(hour));\nQuantity.of(60, miles.over(hour));\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fevinism%2Ftyped-si","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fevinism%2Ftyped-si","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fevinism%2Ftyped-si/lists"}