Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

pretty-ms

Package Overview
Dependencies
Maintainers
1
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pretty-ms - npm Package Compare versions

Comparing version 9.0.0 to 9.1.0

9

index.js

@@ -17,2 +17,5 @@ import parseMilliseconds from 'parse-ms';

const sign = milliseconds < 0 ? '-' : '';
milliseconds = milliseconds < 0 ? -milliseconds : milliseconds; // Cannot use `Math.abs()` because of BigInt support.
if (options.colonNotation) {

@@ -47,3 +50,3 @@ options.compact = false;

valueString = valueString ?? String(value);
valueString ??= String(value);
if (options.colonNotation) {

@@ -127,3 +130,3 @@ const wholeDigits = valueString.includes('.') ? valueString.split('.')[0].length : valueString.length;

if (result.length === 0) {
return '0' + (options.verbose ? ' milliseconds' : 'ms');
return sign + '0' + (options.verbose ? ' milliseconds' : 'ms');
}

@@ -136,3 +139,3 @@

return result.join(separator);
return sign + result.join(separator);
}
{
"name": "pretty-ms",
"version": "9.0.0",
"version": "9.1.0",
"description": "Convert milliseconds to a human readable string: `1337000000` → `15d 11h 23m 20s`",

@@ -52,5 +52,5 @@ "license": "MIT",

"ava": "^6.0.1",
"tsd": "^0.30.4",
"xo": "^0.56.0"
"tsd": "^0.31.0",
"xo": "^0.58.0"
}
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc