Sha256: 21e65fcf85e7bc5a7379c6329571bb8859e848fd7ac5e3c9d7537297b9e25cf3

Contents?: true

Size: 678 Bytes

Versions: 46

Compression:

Stored size: 678 Bytes

Contents

var
  fs = require('fs'),
  tmp = require('../lib/tmp');

function _writeSync(stream, str, cb) {
  var flushed = stream.write(str);
  if (flushed) {
    return cb(null);
  }

  stream.once('drain', function _flushed() {
    cb(null);
  });
}

module.exports.out = function (str, cb) {
  _writeSync(process.stdout, str, cb);
};

module.exports.err = function (str, cb) {
  _writeSync(process.stderr, str, cb);
};

module.exports.exit = function () {
  process.exit(0);
};

var type = process.argv[2];
module.exports.tmpFunction = (type == 'file') ? tmp.file : tmp.dir;

var arg = (process.argv[3] && parseInt(process.argv[3], 10) === 1) ? true : false;
module.exports.arg = arg;

Version data entries

46 entries across 46 versions & 2 rubygems

Version Path
trusty-festivity-extension-2.5.0 node_modules/bower/node_modules/tmp/test/spawn.js
trusty-festivity-extension-2.4.6 node_modules/bower/node_modules/tmp/test/spawn.js
trusty-festivity-extension-2.4.5 node_modules/bower/node_modules/tmp/test/spawn.js
trusty-festivity-extension-2.4.4 node_modules/bower/node_modules/tmp/test/spawn.js
trusty-festivity-extension-2.4.3 node_modules/bower/node_modules/tmp/test/spawn.js
trusty-festivity-extension-2.4.2 node_modules/bower/node_modules/tmp/test/spawn.js
trusty-festivity-extension-2.4.1 node_modules/bower/node_modules/tmp/test/spawn.js
trusty-festivity-extension-2.4.0 node_modules/bower/node_modules/tmp/test/spawn.js
trusty-festivity-extension-2.3.30 node_modules/bower/node_modules/tmp/test/spawn.js
trusty-festivity-extension-2.3.29 node_modules/bower/node_modules/tmp/test/spawn.js
trusty-festivity-extension-2.3.28 node_modules/bower/node_modules/tmp/test/spawn.js
trusty-festivity-extension-2.3.27 node_modules/bower/node_modules/tmp/test/spawn.js
trusty-festivity-extension-2.3.26 node_modules/bower/node_modules/tmp/test/spawn.js
trusty-festivity-extension-2.3.25 node_modules/bower/node_modules/tmp/test/spawn.js
trusty-festivity-extension-2.3.24 node_modules/bower/node_modules/tmp/test/spawn.js
trusty-festivity-extension-2.3.23 node_modules/bower/node_modules/tmp/test/spawn.js
trusty-festivity-extension-2.3.22 node_modules/bower/node_modules/tmp/test/spawn.js
trusty-festivity-extension-2.3.21 node_modules/bower/node_modules/tmp/test/spawn.js
trusty-festivity-extension-2.3.20 node_modules/bower/node_modules/tmp/test/spawn.js
trusty-festivity-extension-2.3.19 node_modules/bower/node_modules/tmp/test/spawn.js