From fdb08f83c95c3fda1c1597adaf2b62b35362740d Mon Sep 17 00:00:00 2001 From: malapeiro Date: Thu, 24 Sep 2026 21:57:36 +0100 Subject: [PATCH] docs: fix incorrect length range in parse() error message The parse() function accepts strings of length 1 to 100, but the error message stated 1 to 99. Aligns the message with the actual validation, matching the intent of PR #89 ("Limit str to 100"). --- src/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/index.ts b/src/index.ts index d50e3c77..35d697af 100644 --- a/src/index.ts +++ b/src/index.ts @@ -71,7 +71,7 @@ export function ms( export function parse(str: string): number { if (typeof str !== 'string' || str.length === 0 || str.length > 100) { throw new Error( - `Value provided to ms.parse() must be a string with length between 1 and 99. value=${JSON.stringify(str)}`, + `Value provided to ms.parse() must be a string with length between 1 and 100. value=${JSON.stringify(str)}`, ); } const match =