Software zum Installieren eines Smart-Mirror Frameworks , zum Nutzen von hochschulrelevanten Informationen, auf einem Raspberry-Pi.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

index.d.ts 684B

123456789101112131415161718192021222324252627282930313233343536373839
  1. /**
  2. Check if [`argv`](https://nodejs.org/docs/latest/api/process.html#process_process_argv) has a specific flag.
  3. @param flag - CLI flag to look for. The `--` prefix is optional.
  4. @param argv - CLI arguments. Default: `process.argv`.
  5. @returns Whether the flag exists.
  6. @example
  7. ```
  8. // $ ts-node foo.ts -f --unicorn --foo=bar -- --rainbow
  9. // foo.ts
  10. import hasFlag = require('has-flag');
  11. hasFlag('unicorn');
  12. //=> true
  13. hasFlag('--unicorn');
  14. //=> true
  15. hasFlag('f');
  16. //=> true
  17. hasFlag('-f');
  18. //=> true
  19. hasFlag('foo=bar');
  20. //=> true
  21. hasFlag('foo');
  22. //=> false
  23. hasFlag('rainbow');
  24. //=> false
  25. ```
  26. */
  27. declare function hasFlag(flag: string, argv?: string[]): boolean;
  28. export = hasFlag;