Files
roll20-character-sheets/Shadowrun6th-German/node_modules/has-flag/index.js
T
Valanor 20750d1f6e Implementing EJS-Template Engine
Adding EJS via npm
Creating ejs-templates for each Tab in the Charakter sheet
2021-03-17 13:09:13 +01:00

9 lines
320 B
JavaScript

'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);
};