# human-readable-ms

> Converts a milliseconds value into a human-readable string.

Latest version **1.1.1** (published 2021-05-06) · ISC license · 0 weekly downloads

## Install

```sh
npm install human-readable-ms
pnpm add human-readable-ms
yarn add human-readable-ms
bun add human-readable-ms
```

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.1 |
| Published | 2021-05-06 |
| First published | 2020-12-29 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 3.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | thwampusthewumpus |
| Maintainers | thwampusthewumpus |

## Links

- npm: https://www.npmjs.com/package/human-readable-ms
- npm.io page: https://npm.io/package/human-readable-ms

## Dependencies (1)

- [parse-ms](https://npm.io/package/parse-ms.md) ^2.1.0

## Recent versions

- 1.1.1 (latest) — 2021-05-06
- 1.1.0 — 2021-01-20
- 1.0.1 — 2020-12-29
- 1.0.0 — 2020-12-29

## README

# human-readable-ms
Converts a milliseconds value into a human-readable string.

## Documentation
```js
/**
 * Converts the given milliseconds to a human-readable String.
 * @param {Number|String} milliseconds - The milliseconds to convert.
 * @param {Object} [options] - Additional options.
 * @param {Boolean} [options.markdown=false] - Whether or not the readable String should include markdown.
 * @param {Boolean} [options.displayMs=false] - Whether or not to display seconds in decimal form (2210 is displayed as 2.21 seconds).
 * @returns {String} The formatted human-readable String.
 */
module.exports = function(milliseconds, options) {
  // ...
}
```

## Examples
```js
const readable_ms = require("human-readable-ms");
readable_ms(345000); // -> "5 minutes and 45 seconds"
readable_ms(2000, { markdown: true }); // -> "**2** seconds"
readable_ms(64240, { markdown: true, displayMs: true }); // -> "**2** seconds"
readable_ms("150"); // -> "0.15 seconds"
```

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