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