From 822659519936938a6089b7a1102ae5aa2c3a56ab Mon Sep 17 00:00:00 2001 From: Haasini Kudala <213454444+Haasini-kudala@users.noreply.github.com> Date: Mon, 21 Sep 2026 21:12:53 +0530 Subject: [PATCH] feat: add is-alphanumerical replacement --- manifests/micro-utilities.json | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/manifests/micro-utilities.json b/manifests/micro-utilities.json index ae866b48..e6889e34 100644 --- a/manifests/micro-utilities.json +++ b/manifests/micro-utilities.json @@ -144,6 +144,12 @@ "description": "You can indent every non-empty line with `String.prototype.replace`, or use `/^/gm` to also indent empty lines, matching the package's `includeEmptyLines` option.", "example": "const indentString = (string, count = 1, indent = ' ') =>\n string.replace(/^(?!\\s*$)/gm, indent.repeat(count));" }, + "snippet::is-alphanumerical": { + "id": "snippet::is-alphanumerical", + "type": "simple", + "description": "You can check if the first character of a string, or a character code, is ASCII alphanumerical by comparing its code against the `0`-`9`, `A`-`Z`, and `a`-`z` ranges.", + "example": "const isAlphanumerical = (character) => {\n const code =\n typeof character === 'string' ? character.charCodeAt(0) : character;\n return (code >= 48 && code <= 57) ||\n (code >= 65 && code <= 90) ||\n (code >= 97 && code <= 122);\n};" + }, "snippet::is-arguments": { "id": "snippet::is-arguments", "type": "simple", @@ -792,6 +798,11 @@ "moduleName": "iota-array", "replacements": ["snippet::array-from-count"] }, + "is-alphanumerical": { + "type": "module", + "moduleName": "is-alphanumerical", + "replacements": ["snippet::is-alphanumerical"] + }, "is-arguments": { "type": "module", "moduleName": "is-arguments",