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
27
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 1.0.1 to 1.1.0

3

index.js

@@ -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 @@ ```

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