Skip to content

feat: add is-alphanumerical replacement - #1129

Open
Haasini-kudala wants to merge 1 commit into
e18e:mainfrom
Haasini-kudala:codex/is-alphanumerical-replacement
Open

Haasini-kudala wants to merge 1 commit into
e18e:mainfrom
Haasini-kudala:codex/is-alphanumerical-replacement

Conversation

@Haasini-kudala

Copy link
Copy Markdown

🔗 Linked issue

Resolves #1001.

📚 Description

Add is-alphanumerical to the micro-utilities manifest with an inline ASCII range check. Like the package, the snippet accepts a numeric character code or checks the first character of a string, and returns false for empty strings and non-ASCII characters.

This follows the existing is-decimal replacement. Comparing the numeric code directly avoids the wrapping and truncation introduced by String.fromCharCode in the issue's suggested snippet. The mapping belongs in micro-utilities because the replacement is a small inline function.

Validation on Node 24:

  • pnpm build and pnpm lint passed.
  • node scripts/validate-pr.ts passed.
  • Compared the manifest's exact snippet against is-alphanumerical@2.0.1 for every Unicode code point as both a number and a string, plus empty/multicharacter strings, numeric boundaries, fractions, and non-finite values: no mismatches.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Replacement]: is-alphanumerical

1 participant