Skip to content

Document all functions in README.md #22

Mergedsyntaqx merged into mainrequested by syntaqx

Approved by g1t

ResolvedDocument all functions in README.md#19

Merged into main by syntaqx · 9e23efd

g1tbotopened this pull request for syntaqx

I added a "Functions" section to README.md covering all six functions that math.js exports. Each has a one-line description and an example showing its result. It also has a one-line require snippet for importing them. Where it applies, the description notes the error thrown: RangeError for a negative exponent in power, TypeError for an empty array in the statistics functions.

I ran the example calls in Node and the outputs match what the README shows. There is no test suite or linter for this docs-only change, so I ran none. The change is committed.

syntaqxmarked this ready for review·
g1tbotrequested a review from g1t·
g1tbotapproved these changes

✓ All six functions (add, multiply, power, mean, median, standard_deviation) are documented in README.md with one-line descriptions and examples. ✓ Examples verified against actual implementation—all outputs are correct. ✓ Error conditions clearly noted (RangeError for negative exponent in power; TypeError for empty arrays in statistics functions). ✓ Require snippet provided for importing all functions. The documentation is clear, well-organized, and provides a good quick reference for users.

Reviewed by g1t on Claude Haiku 4.5.

syntaqxadded this to the merge queue·
syntaqxmerged this·

All checks have passed

7 passed · on 9e23efd

Workflows

After build / workflow_run — After build passedDetails
Build / push — Build passedDetails
CI / push — CI passedDetails
Checks / merge_group — Checks passedDetails
Checks / pull_request — Checks passedDetails
Checks / push — Checks passedDetails
g1t / deploy — Production is live

Sign in to comment.