Changeset 0c6b92a for imaps-frontend/node_modules/has-flag
- Timestamp:
- 12/12/24 17:06:06 (5 weeks ago)
- Branches:
- main
- Parents:
- d565449
- Location:
- imaps-frontend/node_modules/has-flag
- Files:
-
- 3 edited
- 1 moved
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 }; -
imaps-frontend/node_modules/has-flag/package.json
rd565449 r0c6b92a 1 1 { 2 "name": "has-flag", 3 "version": "3.0.0", 4 "description": "Check if argv has a specific flag", 5 "license": "MIT", 6 "repository": "sindresorhus/has-flag", 7 "author": { 8 "name": "Sindre Sorhus", 9 "email": "sindresorhus@gmail.com", 10 "url": "sindresorhus.com" 11 }, 12 "engines": { 13 "node": ">=4" 14 }, 15 "scripts": { 16 "test": "xo && ava" 17 }, 18 "files": [ 19 "index.js" 20 ], 21 "keywords": [ 22 "has", 23 "check", 24 "detect", 25 "contains", 26 "find", 27 "flag", 28 "cli", 29 "command-line", 30 "argv", 31 "process", 32 "arg", 33 "args", 34 "argument", 35 "arguments", 36 "getopt", 37 "minimist", 38 "optimist" 39 ], 40 "devDependencies": { 41 "ava": "*", 42 "xo": "*" 43 } 2 "name": "has-flag", 3 "version": "4.0.0", 4 "description": "Check if argv has a specific flag", 5 "license": "MIT", 6 "repository": "sindresorhus/has-flag", 7 "author": { 8 "name": "Sindre Sorhus", 9 "email": "sindresorhus@gmail.com", 10 "url": "sindresorhus.com" 11 }, 12 "engines": { 13 "node": ">=8" 14 }, 15 "scripts": { 16 "test": "xo && ava && tsd" 17 }, 18 "files": [ 19 "index.js", 20 "index.d.ts" 21 ], 22 "keywords": [ 23 "has", 24 "check", 25 "detect", 26 "contains", 27 "find", 28 "flag", 29 "cli", 30 "command-line", 31 "argv", 32 "process", 33 "arg", 34 "args", 35 "argument", 36 "arguments", 37 "getopt", 38 "minimist", 39 "optimist" 40 ], 41 "devDependencies": { 42 "ava": "^1.4.1", 43 "tsd": "^0.7.2", 44 "xo": "^0.24.0" 45 } 44 46 } -
imaps-frontend/node_modules/has-flag/readme.md
rd565449 r0c6b92a 4 4 5 5 Correctly stops looking after an `--` argument terminator. 6 7 --- 8 9 <div align="center"> 10 <b> 11 <a href="https://tidelift.com/subscription/pkg/npm-has-flag?utm_source=npm-has-flag&utm_medium=referral&utm_campaign=readme">Get professional support for this package with a Tidelift subscription</a> 12 </b> 13 <br> 14 <sub> 15 Tidelift helps make open source sustainable for maintainers while giving companies<br>assurances about security, maintenance, and licensing for their dependencies. 16 </sub> 17 </div> 18 19 --- 6 20 7 21 … … 66 80 67 81 82 ## Security 83 84 To report a security vulnerability, please use the [Tidelift security contact](https://tidelift.com/security). Tidelift will coordinate the fix and disclosure. 85 86 68 87 ## License 69 88
Note:
See TracChangeset
for help on using the changeset viewer.