GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — lib: chenged anonymous function to arrow function · nodejs/node@4eec736

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • lib/internal/process
    • warning.js
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎lib/internal/process/warning.js‎

Copy file name to clipboardExpand all lines: lib/internal/process/warning.js
+5-5Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,14 @@ function writeOut(message) {
2020
}
2121

2222
function onClose(fd) {
23-
return function() {
23+
return () => {
2424
if (fs === null) fs = require('fs');
2525
fs.close(fd, nop);
2626
};
2727
}
2828

2929
function onOpen(cb) {
30-
return function(err, fd) {
30+
return (err, fd) => {
3131
acquiringFd = false;
3232
if (fd !== undefined) {
3333
cachedFd = fd;
@@ -41,7 +41,7 @@ function onOpen(cb) {
4141
function onAcquired(message) {
4242
// make a best effort attempt at writing the message
4343
// to the fd. Errors are ignored at this point.
44-
return function(err, fd) {
44+
return (err, fd) => {
4545
if (err)
4646
return writeOut(message);
4747
if (fs === null) fs = require('fs');
@@ -70,7 +70,7 @@ function output(message) {
7070
}
7171

7272
function doEmitWarning(warning) {
73-
return function() {
73+
return () => {
7474
process.emit('warning', warning);
7575
};
7676
}
@@ -104,7 +104,7 @@ function setupProcessWarnings() {
104104
// process.emitWarning(error)
105105
// process.emitWarning(str[, type[, code]][, ctor])
106106
// process.emitWarning(str[, options])
107-
process.emitWarning = function(warning, type, code, ctor, now) {
107+
process.emitWarning = (warning, type, code, ctor, now) => {
108108
var detail;
109109
if (type !== null && typeof type === 'object' && !Array.isArray(type)) {
110110
ctor = type.ctor;

0 commit comments

Comments
0 (0)
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.