"Fossies" - the Fresh Open Source Software Archive

Member "Atom/resources/app/apm/node_modules/window-size/cli.js" (11 Apr 2017, 511 Bytes) of package /windows/misc/atom-windows.zip:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Javascript source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file.

    1 #!/usr/bin/env node
    2 'use strict';
    3 var helpText = ['Usage',
    4 '  $ window-size',
    5 '',
    6 'Example',
    7 '  $ window-size',
    8 '  height: 40 ',
    9 '  width : 145',
   10 ''].join('\n');
   11 
   12 function showSize () {
   13   var size = require('./');
   14   console.log('height: ' + size.height);
   15   console.log('width : ' + size.width);
   16 }
   17 
   18 if (process.argv.length > 2) {
   19   switch (process.argv[2]) {
   20     case 'help':
   21     case '--help':
   22     case '-h':
   23       console.log(helpText);
   24       break;
   25     default:
   26       showSize();
   27   }
   28 } else {
   29   showSize();
   30 }