https://github.com/shikr/ms
npm package for milliseconds conversions
https://github.com/shikr/ms
conversion javascript milliseconds ms node nodejs npm time typescript
Last synced: 7 months ago
JSON representation
npm package for milliseconds conversions
- Host: GitHub
- URL: https://github.com/shikr/ms
- Owner: shikr
- License: mit
- Created: 2022-10-16T23:54:38.000Z (almost 3 years ago)
- Default Branch: master
- Last Pushed: 2023-09-03T20:29:26.000Z (about 2 years ago)
- Last Synced: 2025-03-21T00:48:23.390Z (7 months ago)
- Topics: conversion, javascript, milliseconds, ms, node, nodejs, npm, time, typescript
- Language: TypeScript
- Homepage:
- Size: 21.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# ms
Convert string to milliseconds.
## Install
```sh
$ npm install @sabier/ms
```## Examples
```js
const { ms } = require('@sabier/ms')ms('1h') // 3600000
ms('2h 30m') // 9000000
ms('3d 4h', true) // { name: '3 days, 4 hours', value: 273600000 }
ms('Hello world!', true) // null
```## License
[MIT © Cristo](./LICENSE.md)