Changeset 0c6b92a for imaps-frontend/node_modules/has-flag/index.js
- Timestamp:
- 12/12/24 17:06:06 (5 weeks ago)
- Branches:
- main
- Parents:
- d565449
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
imaps-frontend/node_modules/has-flag/index.js
rd565449 r0c6b92a 1 1 'use strict'; 2 module.exports = (flag, argv) => { 3 argv = argv || process.argv; 2 3 module.exports = (flag, argv = process.argv) => { 4 4 const prefix = flag.startsWith('-') ? '' : (flag.length === 1 ? '-' : '--'); 5 const pos = argv.indexOf(prefix + flag);6 const terminatorPos = argv.indexOf('--');7 return pos !== -1 && (terminatorPos === -1 ? true : pos < terminatorPos);5 const position = argv.indexOf(prefix + flag); 6 const terminatorPosition = argv.indexOf('--'); 7 return position !== -1 && (terminatorPosition === -1 || position < terminatorPosition); 8 8 };
Note:
See TracChangeset
for help on using the changeset viewer.