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

parse-ms

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

parse-ms

Parse milliseconds into an object

  • 3.0.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
3.7M
decreased by-40.16%
Maintainers
1
Weekly downloads
 
Created

What is parse-ms?

The parse-ms npm package is a utility for parsing milliseconds into an object with more readable time properties such as days, hours, minutes, and seconds. It is useful for converting a duration in milliseconds into a more human-readable format.

What are parse-ms's main functionalities?

Parse milliseconds into an object

This feature allows you to convert a duration in milliseconds into an object with properties for days, hours, minutes, seconds, milliseconds, microseconds, and nanoseconds.

const parseMs = require('parse-ms');
const result = parseMs(1337000000);
console.log(result); // { days: 15, hours: 11, minutes: 23, seconds: 20, milliseconds: 0, microseconds: 0, nanoseconds: 0 }

Handle large durations

This feature demonstrates the ability to handle and accurately parse large durations, breaking them down into their respective time units.

const parseMs = require('parse-ms');
const result = parseMs(9876543210);
console.log(result); // { days: 114, hours: 1, minutes: 29, seconds: 3, milliseconds: 210, microseconds: 0, nanoseconds: 0 }

Other packages similar to parse-ms

Keywords

FAQs

Package last updated on 09 Apr 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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