{"id":22199096,"url":"https://github.com/after-finitude/rescript-ms","last_synced_at":"2025-06-20T12:34:11.745Z","repository":{"id":57354457,"uuid":"382926348","full_name":"after-finitude/rescript-ms","owner":"after-finitude","description":"Reimplementation of ms in ReScript","archived":false,"fork":false,"pushed_at":"2021-07-17T09:23:08.000Z","size":7,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-14T15:01:37.284Z","etag":null,"topics":["ms","rescript"],"latest_commit_sha":null,"homepage":"","language":"ReScript","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/after-finitude.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":"2021-07-04T18:52:20.000Z","updated_at":"2021-07-17T09:23:11.000Z","dependencies_parsed_at":"2022-09-12T05:41:40.372Z","dependency_job_id":null,"html_url":"https://github.com/after-finitude/rescript-ms","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/after-finitude/rescript-ms","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/after-finitude%2Frescript-ms","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/after-finitude%2Frescript-ms/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/after-finitude%2Frescript-ms/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/after-finitude%2Frescript-ms/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/after-finitude","download_url":"https://codeload.github.com/after-finitude/rescript-ms/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/after-finitude%2Frescript-ms/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260945081,"owners_count":23086942,"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":["ms","rescript"],"created_at":"2024-12-02T15:13:16.573Z","updated_at":"2025-06-20T12:34:06.728Z","avatar_url":"https://github.com/after-finitude.png","language":"ReScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# rescript-ms\n\nReimplementation of [ms](https://github.com/vercel/ms) in [ReScript](https://rescript-lang.org).\n\n## Installation\n\n```shell\n# yarn\nyarn add rescript-ms\n\n# or npm\nnpm install --save rescript-ms\n```\n\nThen add `rescript-validator` to your `bsconfig.json`'s `bs-dependencies`:\n\n```json\n\"bs-dependencies\": [\n  \"rescript-ms\"\n]\n```\n\n## Usage\n\n```js\nMs.parse(\"2 days\"); // 172800000\nMs.parse(\"1d\"); // 86400000\nMs.parse(\"10h\"); // 36000000\nMs.parse(\"2.5 hrs\"); // 9000000\nMs.parse(\"2h\"); // 7200000\nMs.parse(\"1m\"); // 60000\nMs.parse(\"5s\"); // 5000\nMs.parse(\"1y\"); // 31557600000\nMs.parse(\"100\"); // 100\nMs.parse(\"-3 days\"); // -259200000\nMs.parse(\"-1h\"); // -3600000\nMs.parse(\"-200\"); // -200\n\nMs.format(60000.0); // \"1m\"\nMs.format(2.0 *. 60000.0); // \"2m\"\nMs.format(-3.0 *. 60000.0); // \"-3m\"\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fafter-finitude%2Frescript-ms","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fafter-finitude%2Frescript-ms","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fafter-finitude%2Frescript-ms/lists"}