Skip to content

[WIP] Update README.md to document all exported members and usage#7

Closed
Copilot wants to merge 2 commits intomainfrom
copilot/fix-8219f4da-1904-420f-81ba-3a130592c311
Closed

[WIP] Update README.md to document all exported members and usage#7
Copilot wants to merge 2 commits intomainfrom
copilot/fix-8219f4da-1904-420f-81ba-3a130592c311

Conversation

Copy link
Copy Markdown

Copilot AI commented Jul 8, 2025

Update README.md to document all exported members from the module:

  • Analyze current codebase and exported members
  • Verify existing tests and build system work correctly
  • Update README.md to add documentation for IPv4 class
  • Update README.md to add documentation for IPv6 class
  • Update README.md to add documentation for IPRange class
  • Clarify the distinction between IP utility object and IP type
  • Ensure all static vs instance methods are clearly marked
  • Test and validate documentation accuracy
  • Final review and commit

The goal is to document all exports from src/index.ts including:

  • IP (utility object) with static methods parse() and cmp()
  • IP (type) representing IPv4 | IPv6 union type
  • IPv4 class with static methods (parse, cmp), instance methods (toString, cidr), and version property
  • IPv6 class with static methods (parse, cmp), instance methods (toString, cidr), and version property
  • IPRange class with static method (parse), instance methods (toString, ips), and properties (first, last, version)

This pull request was created as a result of the following prompt from Copilot chat.

Update the README.md to clearly document all exported members from the module, as exported by src/index.ts (and re-exported by mod.ts), including:

  • IP: A utility object for parsing and comparing addresses, with methods IP.parse(string) and IP.cmp(a, b).
  • IP (type): The union type representing either an IPv4 or IPv6 address instance.
  • IPv4: Class representing an IPv4 address, with static methods (parse, cmp), instance methods (toString, cidr), and version property.
  • IPv6: Class representing an IPv6 address, with static methods (parse, cmp), instance methods (toString, cidr), and version property.
  • IPRange: Class representing a range of IP addresses, with methods such as toString and ips().

For each export, provide a brief description and minimal usage example, eliding unimportant or trivial code with ... per project conventions. Clarify when a method is static or instance. Ensure the documentation matches the actual exports and their signatures.

Do not include full code snippets; use ... where appropriate. Keep the documentation concise and focused on the actual API surface.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Co-authored-by: jviide <19776768+jviide@users.noreply.github.com>
Copilot AI requested a review from jviide July 8, 2025 13:43
@jviide jviide closed this Jul 8, 2025
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.

2 participants