We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 925035b commit 74a0d5aCopy full SHA for 74a0d5a
index.js
@@ -3,7 +3,8 @@ import os from 'node:os';
3
import tty from 'node:tty';
4
5
// From: https://github.com/sindresorhus/has-flag/blob/main/index.js
6
-function hasFlag(flag, argv = globalThis.Deno?.args ?? process.argv) {
+/// function hasFlag(flag, argv = globalThis.Deno?.args ?? process.argv) {
7
+function hasFlag(flag, argv = globalThis.Deno ? globalThis.Deno.args : process.argv) {
8
const prefix = flag.startsWith('-') ? '' : (flag.length === 1 ? '-' : '--');
9
const position = argv.indexOf(prefix + flag);
10
const terminatorPosition = argv.indexOf('--');
0 commit comments