{"id":18572399,"url":"https://github.com/a/to-ms","last_synced_at":"2025-12-12T03:31:53.412Z","repository":{"id":21217648,"uuid":"24530964","full_name":"A/to-ms","owner":"A","description":"Tiny chained ms creation util for NodeJS and browsers","archived":false,"fork":false,"pushed_at":"2019-07-25T12:45:49.000Z","size":56,"stargazers_count":7,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-09T13:45:03.351Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://shuvalov-anton.github.io/to-ms","language":"JavaScript","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/A.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":"2014-09-27T12:11:48.000Z","updated_at":"2023-11-19T12:51:54.000Z","dependencies_parsed_at":"2022-09-03T00:22:10.719Z","dependency_job_id":null,"html_url":"https://github.com/A/to-ms","commit_stats":null,"previous_names":["shuvalov-anton/to-ms"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/A%2Fto-ms","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/A%2Fto-ms/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/A%2Fto-ms/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/A%2Fto-ms/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/A","download_url":"https://codeload.github.com/A/to-ms/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248176306,"owners_count":21060044,"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":[],"created_at":"2024-11-06T23:06:05.528Z","updated_at":"2025-12-12T03:31:53.371Z","avatar_url":"https://github.com/A.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# toMs\n\n[![Build Status](https://travis-ci.org/shuvalov-anton/to-ms.svg)](https://travis-ci.org/shuvalov-anton/to-ms)\n[![Code Climate](https://codeclimate.com/github/shuvalov-anton/to-ms/badges/gpa.svg)](https://codeclimate.com/github/shuvalov-anton/to-ms)\n[![Coverage Status](https://coveralls.io/repos/shuvalov-anton/to-ms/badge.png?branch=master)](https://coveralls.io/r/shuvalov-anton/to-ms?branch=master)\n\n[![NPM](https://nodei.co/npm/to-ms.png?downloads=true)](https://nodei.co/npm/to-ms/)\n\nSimple and human friendly millisecond implementation with awesome chaining. Thanks [@subzey][1] for a sketch and advise :D\n\n[1]: https://github.com/subzey\n\n## Install\n\n```\nnpm install to-ms\n```\n\n## Examples\n\n```js\nvar toMs = require('to-ms');\n\nsetTimeout(\n  function () {\n    /* do something */\n  }, toMs\n    .hour()\n    .minutes(15)\n    .seconds(30)\n);\n```\n\n## Chaining\n\nAll methods are chainable. I mean, you can pretty simple write something like this:\n\n```js\nvar ms = toMs\n  .days(30)\n  .hours(10)\n  .minutes(30)\n  .seconds(45);\n```\n\n## Browser Support\n\nJust use `window.toMs`. To support legacy browsers you must use [ES5-Shim][2].\n\n[2]: https://github.com/es-shims/es5-shim\n\n## Methods\n\n- `toMs.second()`\n- `toMs.seconds(Number)`\n- `toMs.minute()`\n- `toMs.minutes(Number)`\n- `toMs.hour()`\n- `toMs.hours(Number)`\n- `toMs.day()`\n- `toMs.days(Number)`\n- `toMs.week()`\n- `toMs.weeks(Number)`\n- `toMs.year()`\n- `toMs.years(Number)`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fa%2Fto-ms","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fa%2Fto-ms","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fa%2Fto-ms/lists"}