reference

This commit is contained in:
SowinskiBraeden committed 2025-03-18 22:46:53 -07:00
commit aff3c348c4
908 files changed
+93185

No files matched your search

+8
View File
@@ -0,0 +1,8 @@
'use strict';
module.exports = (flag, argv) => {
argv = argv || process.argv;
const prefix = flag.startsWith('-') ? '' : (flag.length === 1 ? '-' : '--');
const pos = argv.indexOf(prefix + flag);
const terminatorPos = argv.indexOf('--');
return pos !== -1 && (terminatorPos === -1 ? true : pos < terminatorPos);
};