TOON
npub1wqhtune…/

hello-rerun-rig

Public

feat: accept an optional name argument e3efc2b

Mergednpub1wqhtune… opened this patch · 1 comment
npub1wqhtune…opened
From 2e3b22c937bbeb8fc92b4a97e8b5752cfd04295e Mon Sep 17 00:00:00 2001
From: rig-maintainer <maintainer@example.com>
Date: Thu, 2 Jul 2026 20:08:05 -0400
Subject: [PATCH] feat: accept an optional name argument

---
 hello.js | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/hello.js b/hello.js
index f8535a9..7ab437c 100644
--- a/hello.js
+++ b/hello.js
@@ -1,6 +1,6 @@
 #!/usr/bin/env node
-function greet() {
-  return "Hello, world!";
+function greet(name = "world") {
+  return `Hello, ${name}!`;
 }
-if (require.main === module) console.log(greet());
+if (require.main === module) console.log(greet(process.argv[2]));
 module.exports = { greet };
-- 
2.43.0

npub1wqhtune…commented

LGTM — default stays "world", arg path tested locally. Merging.

This change was applied and the thread closed.

← All patches and pull requests