Comparing version 2.1.1 to 2.1.2
@@ -31,3 +31,3 @@ /** | ||
return parse(val); | ||
} else if (type === 'number' && isNaN(val) === false) { | ||
} else if (type === 'number' && isFinite(val)) { | ||
return options.long ? fmtLong(val) : fmtShort(val); | ||
@@ -54,3 +54,3 @@ } | ||
} | ||
var match = /^((?:\d+)?\-?\d?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec( | ||
var match = /^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec( | ||
str | ||
@@ -57,0 +57,0 @@ ); |
{ | ||
"name": "ms", | ||
"version": "2.1.1", | ||
"version": "2.1.2", | ||
"description": "Tiny millisecond conversion utility", | ||
@@ -5,0 +5,0 @@ "repository": "zeit/ms", |
# ms | ||
[![Build Status](https://travis-ci.org/zeit/ms.svg?branch=master)](https://travis-ci.org/zeit/ms) | ||
[![Slack Channel](http://zeit-slackin.now.sh/badge.svg)](https://zeit.chat/) | ||
[![Join the community on Spectrum](https://withspectrum.github.io/badge/badge.svg)](https://spectrum.chat/zeit) | ||
@@ -6,0 +6,0 @@ Use this package to easily convert various time formats to milliseconds. |
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
6842
1