vercel

ms

Tiny millisecond conversion utility

by vercel

TypeScript

TypeScript100%

Commit activity

Last 12 weeks · 0 commits

Full graph →

Community health

2 of 6 standards met

Community profile →
62
✓README✓License○Contributing○Code of Conduct○Issue Template○PR Template

Recent PRs & issues

Quiet · Last activity 5mo ago
See all on GitHub →
dsecurity49

Bug Report Description returns values in scientific notation for very large numbers, but cannot handle scientific notation — returning . This breaks the roundtrip contract between the two functions. Steps to Reproduce ```js import { ms } from 'ms'; const out = ms(Number.MAX_VALUE); console.log(out); // "5.696545792019405e+297y" console.log(ms(out)); // NaN — cannot parse its own output Expected Behavior Either: format() should not produce scientific notation output, OR parse() should handle scientific notation input Actual Behavior format() outputs 5.696545792019405e+297y parse() returns NaN for that same string Environment ms version: 4.0.0 Node.js on Android/Termux

dsecurity49 · 1w ago
vjymisal0

Fixes #273. The recent TypeScript rewrite in \ 4.0.0\ introduced a significant performance regression (>40% slower) during parsing, which was tracked down to the use of named capture groups (\?\ and \?\). Executing Regex with named capture groups incurs substantial overhead in V8 compared to standard positional capture groups. By replacing the named capture groups with simple positional groups, we restore the \ms\ parsing performance back to its pre-\ 4.0.0\ baseline while keeping 100% of the TypeScript safety and logic. All tests still pass!

vjymisal0 · 2w ago
Structured data for AI agents

Repository: vercel/ms. Description: Tiny millisecond conversion utility Stars: 5559, Forks: 342. Primary language: TypeScript. Languages: TypeScript (100%). License: MIT. Homepage: https://npmjs.com/ms Topics: conversion, milliseconds, utility. Latest release: 2.1.3 (5y ago). Open PRs: 21, open issues: 19. Last activity: 5mo ago. Community health: 62%. Top contributors: leo, rauchg, dimitropoulos, tj, styfle, greenkeeper[bot], Swatinem, mrmckeb, leerob, greenkeeperio-bot and others.