3 tmp = require('../lib/tmp');
5 function _writeSync(stream, str, cb) {
6 var flushed = stream.write(str);
11 stream.once('drain', function _flushed() {
16 module.exports.out = function (str, cb) {
17 _writeSync(process.stdout, str, cb);
20 module.exports.err = function (str, cb) {
21 _writeSync(process.stderr, str, cb);
24 module.exports.exit = function () {
28 var type = process.argv[2];
29 module.exports.tmpFunction = (type == 'file') ? tmp.file : tmp.dir;
31 var arg = (process.argv[3] && parseInt(process.argv[3], 10) === 1) ? true : false;
32 module.exports.arg = arg;