Home
Docs
GitHub
Pricing
Blog
Log In

Run Sandworm Audit for your App

Get started
Hold on, we're currently generating a fresh version of this report
Generated on May 6, 2024 via pnpm

pretty-ms 8.0.0

Convert milliseconds to a human readable string: `1337000000` β†’ `15d 11h 23m 20s`
Package summary
Share
0
issues
1
license
2
MIT
Package created
20 Mar 2014
Version published
6 Jun 2022
Maintainers
1
Total deps
2
Direct deps
1
License
MIT

Issues

0
This package has no issues

Licenses

MIT License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
sublicense
private-use
Cannot
hold-liable
Must
include-copyright
include-license
2 Packages, Including:
parse-ms@3.0.0
pretty-ms@8.0.0
Disclaimer

This deed highlights only some of the key features and terms of the actual license. It is not a license and has no legal value. You should carefully review all of the terms and conditions of the actual license before using the licensed material.

Sandworm is not a law firm and does not provide legal services. Distributing, displaying, or linking to this deed or the license that it summarizes does not create a lawyer-client or any other relationship.

Direct Dependencies

1
All Dependencies CSV
β“˜ This is a list of pretty-ms 's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.
NameVersionSizeLicenseTypeVulnerabilities
parse-ms3.0.01.72 kBMIT
prod

Visualizations

Frequently Asked Questions

What does pretty-ms do?

The npm package "pretty-ms" is a handy tool designed to convert milliseconds into a human-readable string format. For instance, it can change a number like 1337000000 into a more comprehensible format like 15d 11h 23m 20s, making it much easier to understand for non-technical users or for more readable logging or display in applications.

How do you use pretty-ms?

To use the 'pretty-ms' package, you'll first need to install it to your project using npm with the command npm install pretty-ms. Once installed, you can import it into your JavaScript file using the line import prettyMilliseconds from 'pretty-ms';.

Here are a few examples of how to use the 'pretty-ms' package:

// Basic usage
prettyMilliseconds(1337000000); // Returns '15d 11h 23m 20s'

// Using compact option
prettyMilliseconds(1337, {compact: true}); // Returns '1s'

// Using verbose option
prettyMilliseconds(1335669000, {verbose: true}); // Returns '15 days 11 hours 1 minute 9 seconds'

// Using colonNotation option
prettyMilliseconds(95500, {colonNotation: true}); // Returns '1:35.5'

The 'pretty-ms' package also offers other options such as formatSubMilliseconds, unitCount, and secondsDecimalDigits among others, to provide more flexibility to users.

Where are the pretty-ms docs?

The full documentation for the 'pretty-ms' package can be found in its README file on the GitHub repository page. The URL is: https://github.com/sindresorhus/pretty-ms. The README document provides comprehensive details about the package usage, options and the API. It is also the source for any updates or changes made in the package. It is advisable to keep the link bookmarked for your reference.