Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

humanize-ms

node-modules43.9mMIT2.0.0TypeScript support: included

transform humanize time to ms

humanize, ms

readme

humanize-ms

NPM version Node.js CI Test coverage Known Vulnerabilities npm download

transform humanize time to ms

Installation

npm install humanize-ms

Examples

import { ms } from 'humanize-ms';

ms('1s') // 1000
ms(1000) // 1000

License

MIT

Contributors

Contributors

Made with contributors-img.

changelog

Changelog

1.0.0 (2024-12-12)

⚠ BREAKING CHANGES

  • drop Node.js < 14 support

https://github.com/eggjs/egg/issues/5257

Summary by CodeRabbit

  • New Features
  • Introduced a new function ms for converting human-readable time formats into milliseconds.
  • Added multiple GitHub Actions workflows for CI, testing, and publishing automation.

    • Updated TypeScript configuration for improved type safety.
  • Bug Fixes

  • Removed outdated configuration files that could lead to linting errors or CI issues.

  • Documentation

  • Updated README.md with new CI/CD references, installation instructions, and contributor acknowledgments.

    • Added a license section with the MIT License.
  • Chores

  • Updated package.json with new dependencies and scripts for linting and testing.

Features

  • index.js: warn when result is undefined (b89dae5)
  • refactor with TypeScript (#5) (14964af)

Bug Fixes

  • package.json to reduce vulnerabilities (#3) (3b6f1ba)

1.2.1 / 2017-05-19

  • fix: package.json to reduce vulnerabilities (#3)

1.2.0 / 2016-05-21

  • feat: warn with stack

1.1.0 / 2016-04-04

  • deps: upgrade ms to 0.7.0

1.0.1 / 2014-12-31

  • feat(index.js): warn when result is undefined

1.0.0 / 2014-08-14

  • init