Pick any line to see why it is the way it is: the commit, the pull request and issue it came from, and what the agent was thinking.
| Add math helpers, tests and checks | 1 | const assert = require("node:assert"); |
| 2 | const math = require("./math"); | |
| 3 | ||
| 4 | assert.strictEqual(math.add(2, 3), 5); | |
| Merge #3: Add multiply to math.js | 5 | assert.strictEqual(math.multiply(4, 5), 20); |
| Add mod function to math.js | 6 | assert.strictEqual(math.mod(7, 3), 1); |
| 7 | assert.strictEqual(math.mod(-1, 3), 2); | |
| 8 | assert.strictEqual(math.mod(6, 3), 0); | |
| 9 | assert.strictEqual(math.mod(-1, -3), 2); | |
| 10 | assert.throws(() => math.mod(1, 0), RangeError); | |
| Add math helpers, tests and checks | 11 | console.log("all tests passed"); |
This file's history is long; its oldest lines are credited to the oldest commit read.