# go-duration

> Converts a humanreadble string of duration to miliseconds

Latest version **1.0.0** (published 2017-11-06) · ISC license · 0 weekly downloads

## Install

```sh
npm install go-duration
pnpm add go-duration
yarn add go-duration
bun add go-duration
```

## 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.0.0 |
| Published | 2017-11-06 |
| First published | 2017-11-06 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Igor Gorodetskyy |
| Maintainers | igor-go |
| Keywords | duration, human, readable |

## Links

- npm: https://www.npmjs.com/package/go-duration
- Repository: https://github.com/igorgo/go-duration
- Homepage: https://github.com/igorgo/go-duration#readme
- Issues: https://github.com/igorgo/go-duration/issues
- npm.io page: https://npm.io/package/go-duration

## Alternatives

- [byte-size](https://npm.io/package/byte-size.md) — 2.1M weekly downloads
- [speed-limiter](https://npm.io/package/speed-limiter.md) — 16.0K weekly downloads
- [@powersync/node](https://npm.io/package/@powersync/node.md) — 10.9K weekly downloads
- [@ledgerhq/coin-cardano](https://npm.io/package/@ledgerhq/coin-cardano.md) — 1.0K weekly downloads
- [@jayesol/jayeson.lib.streamfinder](https://npm.io/package/@jayesol/jayeson.lib.streamfinder.md) — 1.0K weekly downloads

## Recent versions

- 1.0.0 (latest) — 2017-11-06

## README

# go-duration
[![Build Status](https://travis-ci.org/igorgo/go-duration.svg?branch=master)](https://travis-ci.org/igorgo/go-duration)

Converts a humanreadble string of duration to miliseconds

## Usage

```
$ npm install go-duration
```

```js
const duration = require('go-duration')

duration('2d')
//=> 172800000

duration('2h')
//=> 7200000

duration('2m')
//=> 120000

duration('2s')
//=> 2000

duration('1d 1h 1m 1s')
//=> 90061000

duration('null')
//=> 0

duration(10000)
//=> 10000
```

## Test
```
$ npm test
```

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