"Fossies" - the Fresh Open Source Software Archive

Member "Atom/resources/app/apm/node_modules/request/node_modules/uuid/bin/uuid" (7 Feb 2017, 597 Bytes) of archive /windows/misc/atom-windows.zip:


As a special service "Fossies" has tried to format the requested text file into HTML format (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file.

    1 #!/usr/bin/env node
    2 
    3 var path = require('path');
    4 var uuid = require(path.join(__dirname, '..'));
    5 
    6 var arg = process.argv[2];
    7 
    8 if ('--help' === arg) {
    9   console.log('\n  USAGE: uuid [version] [options]\n\n');
   10   console.log('  options:\n');
   11   console.log('  --help                     Display this message and exit\n');
   12   process.exit(0);
   13 }
   14 
   15 if (null == arg) {
   16   console.log(uuid());
   17   process.exit(0);
   18 }
   19 
   20 if ('v1' !== arg && 'v4' !== arg) {
   21   console.error('Version must be RFC4122 version 1 or version 4, denoted as "v1" or "v4"');
   22   process.exit(1);
   23 }
   24 
   25 console.log(uuid[arg]());
   26 process.exit(0);