implies_hash.js 408 B

1234567891011121314151617181920212223242526
  1. #!/usr/bin/env node
  2. var argv = require('yargs')
  3. .usage('Usage: $0 -x [num] -y [num] -w [msg] -h [msg]')
  4. .implies({
  5. x: 'y',
  6. w: '--no-h',
  7. 1: 'h'
  8. })
  9. .argv;
  10. if (argv.x) {
  11. console.log('x / y : ' + (argv.x / argv.y));
  12. }
  13. if (argv.y) {
  14. console.log('y: ' + argv.y);
  15. }
  16. if (argv.w) {
  17. console.log('w: ' +argv.w);
  18. }
  19. if (argv.h) {
  20. console.log('h: ' +argv.h);
  21. }