A README-generation review with original CLI source, command evidence and complete repository Markdown
HTML for this example
Select the code and use your copy shortcut. Changes in this preview are temporary.
<!doctype html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><meta http-equiv="Content-Security-Policy" content="default-src 'none'; style-src 'unsafe-inline'; form-action 'none'; base-uri 'none'"><title>cents-total - README generation review</title><style>*{box-sizing:border-box}body{margin:0;font:16px/1.5 Arial,Helvetica,sans-serif;color:#24313b;background:#fff}main{max-width:900px;margin:auto;padding:22px}h1{font-size:26px;line-height:1.2;margin:8px 0 18px}h2{font-size:19px;margin:22px 0 10px}h3{font-size:17px;margin:14px 0 8px}p{margin:10px 0}ul,ol{padding-left:22px}li{margin:6px 0}.note{font-size:13px;color:#53616a}.callout{border-left:4px solid #405d73;background:#f2f5f7;padding:10px 14px}table{border-collapse:collapse;width:100%;margin:12px 0}caption{text-align:left;font-weight:bold;padding:0 0 8px}th,td{padding:9px 8px;text-align:left;vertical-align:top;border-bottom:1px solid #b8c3ca;overflow-wrap:anywhere}th{background:#edf2f5}td b{display:none}footer{border-top:1px solid #aeb9bf;margin-top:22px;padding-top:12px}pre{white-space:pre-wrap;overflow-wrap:anywhere;font:16px/1.5 ui-monospace,monospace;background:#f5f5f5;padding:12px}@media(max-width:560px){main{padding:16px}h1{font-size:23px}thead{display:none}table,tbody,tr,td{display:block;width:100%}caption{display:block}tr{border-bottom:1px solid #aeb9bf;padding:6px 0}td{border:0;padding:3px 0}td b{display:inline}}@media print{@page{size:letter;margin:.5in}main{padding:0}}.command{border-left:4px solid #654e79;background:#f4f1f7;padding:10px 14px}pre{font-size:14px}summary{cursor:pointer;padding:10px 0}summary:focus-visible{outline:3px solid #654e79;outline-offset:3px}.readme{border-top:3px solid #654e79;padding-top:12px}@media(min-width:561px){th:last-child,td:last-child{min-width:46px;white-space:nowrap}}</style></head><body><main><p class="note">Original unpublished teaching program - Markdown draft and actual execution evidence</p><h1>cents-total - README from checked commands</h1><p>Sum nonnegative integer amounts in cents. Single entry file: cents-total.mjs. No dependencies, package manifest, network or currency conversion.</p><div class="command"><p><strong>Checked command:</strong> <code>node cents-total.mjs 125 275</code></p><p><strong>stdout:</strong> 400 cents. <strong>stderr:</strong> empty. <strong>Exit:</strong> 0. Runtime checked: Node 24.11.0; other version compatibility unverified.</p></div><h2>Execution record - success and failure</h2><table><caption>Eight actual local Node command checks</caption><thead><tr><th scope="col">Arguments</th><th scope="col">stdout / stderr</th><th scope="col">Exit</th></tr></thead><tbody><tr data-case="0"><td><b>Arguments: </b>125 275</td><td><b>stdout / stderr: </b>400 cents / stderr empty</td><td><b>Exit: </b>0</td></tr><tr data-case="1"><td><b>Arguments: </b>0</td><td><b>stdout / stderr: </b>0 cents / stderr empty</td><td><b>Exit: </b>0</td></tr><tr data-case="2"><td><b>Arguments: </b>(none)</td><td><b>stdout / stderr: </b>stdout empty / Provide one or more integer amounts in cents.</td><td><b>Exit: </b>1</td></tr><tr data-case="3"><td><b>Arguments: </b>-1</td><td><b>stdout / stderr: </b>stdout empty / Amounts must be nonnegative integer cents.</td><td><b>Exit: </b>1</td></tr><tr data-case="4"><td><b>Arguments: </b>1.5</td><td><b>stdout / stderr: </b>stdout empty / Amounts must be nonnegative integer cents.</td><td><b>Exit: </b>1</td></tr><tr data-case="5"><td><b>Arguments: </b>abc</td><td><b>stdout / stderr: </b>stdout empty / Amounts must be nonnegative integer cents.</td><td><b>Exit: </b>1</td></tr><tr data-case="6"><td><b>Arguments: </b>9007199254740992</td><td><b>stdout / stderr: </b>stdout empty / Amount exceeds safe integer range.</td><td><b>Exit: </b>1</td></tr><tr data-case="7"><td><b>Arguments: </b>9007199254740991 1</td><td><b>stdout / stderr: </b>stdout empty / Total exceeds safe integer range.</td><td><b>Exit: </b>1</td></tr></tbody></table><details><summary>Read complete original cents-total.mjs source</summary><pre>const args = process.argv.slice(2);
const fail = message => { console.error(message); process.exit(1); };
if (!args.length) fail('Provide one or more integer amounts in cents.');
let total = 0;
for (const text of args) {
if (!/^\d+$/.test(text)) fail('Amounts must be nonnegative integer cents.');
const amount = Number(text);
if (!Number.isSafeInteger(amount)) fail('Amount exceeds safe integer range.');
total += amount;
if (!Number.isSafeInteger(total)) fail('Total exceeds safe integer range.');
}
console.log(total + ' cents');
</pre></details><h2 class="readme">Complete generated README.md draft</h2><p>Select the Markdown below with your normal text-selection command. Put the reviewed file in the actual repository; this page does not publish to GitHub.</p><pre data-readme># cents-total
Original unpublished teaching example. Sum nonnegative integer amounts in cents; no currency conversion or external dependencies.
## Run
Save the supplied source as cents-total.mjs in a separate local folder. Node v24.11.0 was checked; other runtime compatibility is unverified. No package installation or npm script is required.
~~~sh
node cents-total.mjs 125 275
~~~
Expected stdout: 400 cents. Exit: 0.
~~~sh
node cents-total.mjs 0
~~~
Expected stdout: 0 cents. Exit: 0.
## Invalid input
Missing arguments: Provide one or more integer amounts in cents.
Negative, decimal or nonnumeric input: Amounts must be nonnegative integer cents.
Unsafe amount: Amount exceeds safe integer range.
Unsafe total: Total exceeds safe integer range.
Each error writes to stderr, exits 1 and emits no stdout.
~~~sh
node cents-total.mjs
node cents-total.mjs -1
node cents-total.mjs 1.5
node cents-total.mjs abc
node cents-total.mjs 9007199254740992
node cents-total.mjs 9007199254740991 1
~~~
## Limits
Integer cents only. No files, network, currency conversion or hosted service. The entry file is cents-total.mjs.
## Help and project facts
Support route, maintainer, license and contribution policy: [TO CONFIRM]. This draft grants no license permission and invents no clone URL or CI badge. Review these facts and the commands before adopting README.md in an actual repository.
</pre><footer>Confirm support, maintainer, license and contribution facts before adoption. Ask a teammate to run the commands with the supplied source, revise README.md and review its repository diff. This reading aid does not commit or publish a project.</footer></main></body></html>