3.1.2 • Published 6 years ago

@dnode/duration v3.1.2

Weekly downloads
1
License
MIT
Repository
github
Last release
6 years ago

dependencies | 2 | 2

Usage

const duration = require('@dnode/duration');

const milliseconds = duration('1h 20m').asMilliseconds();
const seconds = duration('1h 20m').asSeconds();

Input formats

Supported by parse-duration.

Output format methods

Supported by moment.duration.

FAQ

Why use it over moment?

moment split the number and the format in two parameters, e.g. moment.duration(3, 'days'). That is not really usable together with environment variables, e.g. duration(process.env.DURATION || '3 days').

3.1.2

6 years ago

3.1.1

6 years ago

3.1.0

6 years ago

3.0.0

6 years ago

2.0.0

6 years ago

1.1.0

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago