From 2dca7b771a2f9aa1e0be319267014f2acbd93464 Mon Sep 17 00:00:00 2001 From: Kamalesh Date: Sun, 20 Sep 2026 15:50:08 +0530 Subject: [PATCH] feat(micro-utilities): add is-upper-case to replacements Adds the snippet::is-upper-case replacement and the is-upper-case module mapping, following the same shape as the merged is-lower-case entry. The implementation is the locale-aware check suggested in #1004 (deprecated package): a string is entirely upper case when it equals its toLocaleUpperCase form and contains cased characters. --- manifests/micro-utilities.json | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/manifests/micro-utilities.json b/manifests/micro-utilities.json index ae866b48..8205cb1e 100644 --- a/manifests/micro-utilities.json +++ b/manifests/micro-utilities.json @@ -438,6 +438,12 @@ "description": "You can use `typeof` to check if a value is `undefined`.", "example": "typeof value === \"undefined\"" }, + "snippet::is-upper-case": { + "id": "snippet::is-upper-case", + "type": "simple", + "description": "You can compare the string against its upper-cased form to determine if the string is entirely upper case", + "example": "const isUpperCase = (input, locale) =>\n input.toLocaleUpperCase(locale) === input &&\n input !== input.toLocaleLowerCase(locale)" + }, "snippet::is-weakmap": { "id": "snippet::is-weakmap", "type": "simple", @@ -1052,6 +1058,11 @@ "moduleName": "is-unc-path", "replacements": ["snippet::is-unc-path"] }, + "is-upper-case": { + "type": "module", + "moduleName": "is-upper-case", + "replacements": ["snippet::is-upper-case"] + }, "is-whitespace": { "type": "module", "moduleName": "is-whitespace",