Skip to content

Comments

docs: add JSDoc documentation to utility functions across common utils#2707

Open
Dark-Brain07 wants to merge 13 commits intostx-labs:mainfrom
Dark-Brain07:improve/accessibility-and-types
Open

docs: add JSDoc documentation to utility functions across common utils#2707
Dark-Brain07 wants to merge 13 commits intostx-labs:mainfrom
Dark-Brain07:improve/accessibility-and-types

Conversation

@Dark-Brain07
Copy link

What type of PR is this? (check all applicable)

  • Refactor
  • Feature
  • Bug Fix
  • Optimization
  • Documentation Update

Description

Added comprehensive JSDoc documentation with @param, @returns, and @example tags to several undocumented utility functions in the src/common/utils/ directory. These functions are used throughout the explorer codebase but were missing inline documentation, making it harder for new contributors to understand their purpose and usage.

Files changed:

  • number-utils.ts — Added JSDoc to isUint128, isStringNumber, and bigintPow with examples and context about their use in the Stacks ecosystem (e.g., uint128 for token amounts).

  • string-utils.ts — Added JSDoc to splitStxAddressIntoParts which was the only undocumented function in the file. Documented its grouping behavior and edge case handling for trailing characters.

  • validateUrl.ts — Added JSDoc to validateUrl explaining that it uses the URL constructor for validation, with usage examples.

  • date-utils.ts — Added JSDoc to formatDateShort documenting the en-GB locale format and expected output like "14 Feb".

Issue ticket number and link

N/A — proactive documentation improvement.

Checklist:

  • I have performed a self-review of my code.
  • I have tested the change on desktop and mobile.
  • I have added thorough tests where applicable.
  • I've added analytics and error logging where applicable.

Screenshots (if appropriate):

N/A — documentation-only changes, no visual impact.

@vercel
Copy link

vercel bot commented Feb 14, 2026

@Dark-Brain07 is attempting to deploy a commit to the Stacks Labs Team on Vercel.

A member of the Team first needs to authorize it.

@Dark-Brain07 Dark-Brain07 force-pushed the improve/accessibility-and-types branch from dd64b1d to 5e95867 Compare February 14, 2026 05:46
@Dark-Brain07 Dark-Brain07 force-pushed the improve/accessibility-and-types branch from 5e95867 to ec391c2 Compare February 14, 2026 09:55
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.

1 participant