Skip to content

Commit

Permalink
Meta tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
sindresorhus committed Apr 27, 2020
1 parent 20cbdaf commit db175eb
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ module.exports = (milliseconds, options = {}) => {
roundedMiliseconds;

add(
parseFloat(millisecondsString, 10),
Number.parseFloat(millisecondsString, 10),
'millisecond',
'ms',
millisecondsString
Expand All @@ -105,7 +105,7 @@ module.exports = (milliseconds, options = {}) => {
const secondsString = options.keepDecimalsOnWholeSeconds ?
secondsFixed :
secondsFixed.replace(/\.0+$/, '');
add(parseFloat(secondsString, 10), 'second', 's', secondsString);
add(Number.parseFloat(secondsString, 10), 'second', 's', secondsString);
}

if (result.length === 0) {
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"author": {
"name": "Sindre Sorhus",
"email": "sindresorhus@gmail.com",
"url": "sindresorhus.com"
"url": "https://sindresorhus.com"
},
"engines": {
"node": ">=10"
Expand Down Expand Up @@ -44,6 +44,6 @@
"devDependencies": {
"ava": "^2.4.0",
"tsd": "^0.11.0",
"xo": "^0.25.3"
"xo": "^0.30.0"
}
}
2 changes: 1 addition & 1 deletion readme.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# pretty-ms [![Build Status](https://travis-ci.org/sindresorhus/pretty-ms.svg?branch=master)](https://travis-ci.org/sindresorhus/pretty-ms)
# pretty-ms [![Build Status](https://travis-ci.com/sindresorhus/pretty-ms.svg?branch=master)](https://travis-ci.com/sindresorhus/pretty-ms)

> Convert milliseconds to a human readable string: `1337000000``15d 11h 23m 20s`
Expand Down
2 changes: 1 addition & 1 deletion test.js
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ test('throw on invalid', t => {
});

t.throws(() => {
prettyMilliseconds(NaN);
prettyMilliseconds(Number.NaN);
});

t.throws(() => {
Expand Down

0 comments on commit db175eb

Please sign in to comment.