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

humanize-ms

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

humanize-ms

transform humanize time to ms

  • 1.0.2
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
10M
increased by6.76%
Maintainers
1
Weekly downloads
 
Created

What is humanize-ms?

The humanize-ms npm package is designed to convert various time formats into milliseconds. It is particularly useful for applications that need to handle and manipulate time intervals in a human-readable format and then convert them to milliseconds for processing or scheduling tasks.

What are humanize-ms's main functionalities?

Convert human-readable strings to milliseconds

This feature allows the conversion of a human-readable string like '2 days' into its equivalent in milliseconds. It is useful for setting timeouts, intervals, or calculating durations in applications.

const humanize = require('humanize-ms');
console.log(humanize('2 days')); // 172800000

Support for various time units

The package supports various time units such as hours, minutes, and seconds, allowing for flexible conversions depending on the needs of the application.

const humanize = require('humanize-ms');
console.log(humanize('1 hour')); // 3600000
console.log(humanize('30 seconds')); // 30000

Other packages similar to humanize-ms

Keywords

FAQs

Package last updated on 04 Apr 2016

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