Skip to content

Commit

Permalink
lib: chenged anonymous function to arrow function
Browse files Browse the repository at this point in the history
PR-URL: #24605
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Masashi Hirano <shisama07@gmail.com>
Reviewed-By: Shingo Inoue <leko.noor@gmail.com>
  • Loading branch information
kojiGit55 authored and Trott committed Nov 29, 2018
1 parent 8344f24 commit acfcd78
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions lib/internal/process/warning.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,14 @@ function writeOut(message) {
}

function onClose(fd) {
return function() {
return () => {
if (fs === null) fs = require('fs');
fs.close(fd, nop);
};
}

function onOpen(cb) {
return function(err, fd) {
return (err, fd) => {
acquiringFd = false;
if (fd !== undefined) {
cachedFd = fd;
Expand All @@ -41,7 +41,7 @@ function onOpen(cb) {
function onAcquired(message) {
// make a best effort attempt at writing the message
// to the fd. Errors are ignored at this point.
return function(err, fd) {
return (err, fd) => {
if (err)
return writeOut(message);
if (fs === null) fs = require('fs');
Expand Down Expand Up @@ -70,7 +70,7 @@ function output(message) {
}

function doEmitWarning(warning) {
return function() {
return () => {
process.emit('warning', warning);
};
}
Expand Down Expand Up @@ -104,7 +104,7 @@ function setupProcessWarnings() {
// process.emitWarning(error)
// process.emitWarning(str[, type[, code]][, ctor])
// process.emitWarning(str[, options])
process.emitWarning = function(warning, type, code, ctor, now) {
process.emitWarning = (warning, type, code, ctor, now) => {
let detail;
if (type !== null && typeof type === 'object' && !Array.isArray(type)) {
ctor = type.ctor;
Expand Down

0 comments on commit acfcd78

Please sign in to comment.