Skip to content

doc(README): overhaul with TOC and filled in#200

Merged
whitequark merged 1 commit into
whitequark:mainfrom
msimerson:readme
May 8, 2026
Merged

doc(README): overhaul with TOC and filled in#200
whitequark merged 1 commit into
whitequark:mainfrom
msimerson:readme

Conversation

@msimerson

@msimerson msimerson commented May 6, 2026

Copy link
Copy Markdown
Contributor

Structural improvements, fixes #65

  • Added a Table of Contents with anchor links to every method
  • Added a Quick Start section with the 3 most common use cases
  • Each method now has its own heading

Content corrections

  • The old README said "four global methods"; the actual count is seven, all are now documented
  • Fixed broken examples: subnetMaskFromPrefixLength(24) == '255.255.255.0' and similar comparisons silently evaluate to false because the method returns an IPv4 object, not a string — corrected to use .toString()
  • Updated source line anchors for the range tables (IPv4: 182→184, IPv6: 530→562)

New documentation

  • parseCIDR, subnetMatch, fromByteArray (global)
  • isIPv4, isIPv6 — lightweight format checks
  • isValidFourPartDecimal, isValidCIDRFourPartDecimal — explained as strict-mode validators
  • toFixedLengthString, toRFC5952String
  • broadcastAddressFromCIDR / networkAddressFromCIDR — existed but without examples
  • subnetMatch instance method on both IPv4 and IPv6
  • prefixLengthFromSubnetMask for IPv6

View it rendered in GHFM here in my fork. Make comments and suggestions.

@msimerson msimerson force-pushed the readme branch 2 times, most recently from d9f7dda to 2950237 Compare May 6, 2026 23:05
Comment thread README.md

@whitequark whitequark left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, this looks very well-written and comprehensive! I admit I haven't had the time available to proofread the entire thing but I don't think it's really necessary here.

@whitequark whitequark merged commit c52a613 into whitequark:main May 8, 2026
8 checks passed
@msimerson msimerson deleted the readme branch May 8, 2026 23:54
@msimerson

Copy link
Copy Markdown
Contributor Author

Hey, in 9 more years I'll drop by and do it again. 😁

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.

Add real API documentation and examples

2 participants