Comparing version 1.0.1 to 1.1.0
@@ -23,2 +23,3 @@ 'use strict'; | ||
var secDecimalDigits = typeof opts.secDecimalDigits === 'number' ? opts.secDecimalDigits : 1; | ||
var ret = []; | ||
@@ -36,5 +37,5 @@ var parsed = parseMs(ms); | ||
ret = add(ret, (ms / 1000 % 60).toFixed(1).replace(/\.0$/, ''), 's'); | ||
ret = add(ret, (ms / 1000 % 60).toFixed(secDecimalDigits).replace(/\.0$/, ''), 's'); | ||
return ret.join(' '); | ||
}; |
{ | ||
"name": "pretty-ms", | ||
"version": "1.0.1", | ||
"version": "1.1.0", | ||
"description": "Convert milliseconds to a human readable string: 1337000000 → 15d 11h 23m 20s", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
@@ -8,3 +8,3 @@ # pretty-ms [![Build Status](https://travis-ci.org/sindresorhus/pretty-ms.svg?branch=master)](https://travis-ci.org/sindresorhus/pretty-ms) | ||
```sh | ||
``` | ||
$ npm install --save pretty-ms | ||
@@ -44,4 +44,13 @@ ``` | ||
#### options.compact | ||
#### options | ||
##### secDecimalDigits | ||
Type: `number` | ||
Default: `1` | ||
Number of digits to appear after the seconds decimal point. | ||
##### compact | ||
Type: `boolean` | ||
@@ -54,3 +63,3 @@ | ||
```sh | ||
``` | ||
$ npm install --global pretty-ms | ||
@@ -57,0 +66,0 @@ ``` |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
72
81
3598
4