# parse-ms

> Parse milliseconds into an object

Latest version **4.0.0** (published 2024-01-07) · MIT license · 0 weekly downloads

## Install

```sh
npm install parse-ms
pnpm add parse-ms
yarn add parse-ms
bun add parse-ms
```

## Health

**Score 30/100 (F)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 4.0.0 |
| Published | 2024-01-07 |
| First published | 2014-03-20 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM |
| Node | >=18 |
| Dependencies | 0 |
| Unpacked size | 4.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 122 |
| Author | Sindre Sorhus |
| Maintainers | sindresorhus |
| Keywords | browser, parse, time, ms, milliseconds, microseconds, nanoseconds, duration, period, range, interval |

## Links

- npm: https://www.npmjs.com/package/parse-ms
- Repository: https://github.com/sindresorhus/parse-ms
- Homepage: https://github.com/sindresorhus/parse-ms#readme
- Issues: https://github.com/sindresorhus/parse-ms/issues
- Funding: https://github.com/sponsors/sindresorhus
- npm.io page: https://npm.io/package/parse-ms

## Alternatives

- [@opentelemetry/exporter-zipkin](https://npm.io/package/@opentelemetry/exporter-zipkin.md) — 14.8M weekly downloads
- [pusher-js](https://npm.io/package/pusher-js.md) — 2.0M weekly downloads
- [browserify](https://npm.io/package/browserify.md) — 1.7M weekly downloads
- [sqs-consumer](https://npm.io/package/sqs-consumer.md) — 1.7M weekly downloads
- [@sanity/eventsource](https://npm.io/package/@sanity/eventsource.md) — 930.8K weekly downloads

## Recent versions

- 4.0.0 (latest) — 2024-01-07
- 3.0.0 — 2021-04-09
- 2.1.0 — 2019-04-24
- 2.0.0 — 2018-07-03
- 1.0.1 — 2016-02-16
- 1.0.0 — 2014-08-13
- 0.1.2 — 2014-04-30
- 0.1.1 — 2014-04-16
- 0.1.0 — 2014-03-20

## README

# parse-ms

> Parse milliseconds into an object

## Install

```sh
npm install parse-ms
```

## Usage

```js
import parseMilliseconds from 'parse-ms';

parseMilliseconds(1337000001);
/*
{
	days: 15,
	hours: 11,
	minutes: 23,
	seconds: 20,
	milliseconds: 1,
	microseconds: 0,
	nanoseconds: 0
}
*/

parseMilliseconds(1337000001n);
/*
{
	days: 15n,
	hours: 11n,
	minutes: 23n,
	seconds: 20n,
	milliseconds: 1n,
	microseconds: 0n,
	nanoseconds: 0n
}
*/
```

## Related

- [to-milliseconds](https://github.com/sindresorhus/to-milliseconds) - The inverse of this module
- [pretty-ms](https://github.com/sindresorhus/pretty-ms) - Convert milliseconds to a human readable string

---
_Source: https://npm.io/package/parse-ms · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
