From 97ee50e9fe1ae2a2347cce5b81489a5a2875a589 Mon Sep 17 00:00:00 2001 From: bcoe Date: Sun, 2 May 2021 11:42:59 -0700 Subject: [PATCH 1/2] docs: document hideBin Fixes #1871 --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 856779f75..5cd558223 100644 --- a/README.md +++ b/README.md @@ -70,6 +70,8 @@ if (argv.ships > 3 && argv.distance < 53.5) { } ``` +> Note: `hideBin` is a shorthand for [`process.argv.slice(2)`](https://nodejs.org/en/knowledge/command-line/how-to-parse-command-line-arguments/). It has the benefit that it takes into account variations in some environments, e.g., [Electron](https://github.com/electron/electron/issues/4690). + ```bash $ ./plunder.js --ships=4 --distance=22 Plunder more riffiwobbles! From 0bf7d9737024d1035f5b2e270d62cebb7f4a3052 Mon Sep 17 00:00:00 2001 From: bcoe Date: Sun, 2 May 2021 11:45:23 -0700 Subject: [PATCH 2/2] docs: move hideBin down a bit --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 5cd558223..3494c14af 100644 --- a/README.md +++ b/README.md @@ -70,8 +70,6 @@ if (argv.ships > 3 && argv.distance < 53.5) { } ``` -> Note: `hideBin` is a shorthand for [`process.argv.slice(2)`](https://nodejs.org/en/knowledge/command-line/how-to-parse-command-line-arguments/). It has the benefit that it takes into account variations in some environments, e.g., [Electron](https://github.com/electron/electron/issues/4690). - ```bash $ ./plunder.js --ships=4 --distance=22 Plunder more riffiwobbles! @@ -80,6 +78,8 @@ $ ./plunder.js --ships 12 --distance 98.7 Retreat from the xupptumblers! ``` +> Note: `hideBin` is a shorthand for [`process.argv.slice(2)`](https://nodejs.org/en/knowledge/command-line/how-to-parse-command-line-arguments/). It has the benefit that it takes into account variations in some environments, e.g., [Electron](https://github.com/electron/electron/issues/4690). + ### Complex Example ```javascript