Use rest parameters
This commit is contained in:
parent
e05804848f
commit
8889c29866
14 changed files with 88 additions and 143 deletions
|
@ -1,11 +1,11 @@
|
|||
'use strict';
|
||||
|
||||
const fs = require('fs');
|
||||
const path = require('path');
|
||||
const util = require('util');
|
||||
const Module = require('module');
|
||||
const v8 = require('v8');
|
||||
|
||||
var slice = [].slice;
|
||||
|
||||
// We modified the original process.argv to let node.js load the atom.js,
|
||||
// we need to restore it here.
|
||||
process.argv.splice(1, 1);
|
||||
|
@ -28,9 +28,7 @@ globalPaths.push(path.join(__dirname, 'api', 'exports'));
|
|||
if (process.platform === 'win32') {
|
||||
// Redirect node's console to use our own implementations, since node can not
|
||||
// handle console output when running as GUI program.
|
||||
var consoleLog = function() {
|
||||
var args;
|
||||
args = 1 <= arguments.length ? slice.call(arguments, 0) : [];
|
||||
var consoleLog = function(...args) {
|
||||
return process.log(util.format.apply(util, args) + "\n");
|
||||
};
|
||||
var streamWrite = function(chunk, encoding, callback) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue