module: rename anonymous functions by ranstyr · Pull Request #13849 · nodejs/node

@ranstyr

This is my first contribution!
#GoodnessSquad
#8913

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • documentation is changed or added
  • [X ] commit message follows commit guidelines
Affected core subsystem(s)

#GoodnessSquad

@ranstyr

@ranstyr

mscdex

var nodePath = process.env['NODE_PATH'];
if (nodePath) {
paths = nodePath.split(path.delimiter).filter(function(path) {
paths = nodePath.split(path.delimiter).filter(function pathsFilterCallback(path) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is the only one that's necessary. The rest should show up as expected in stack traces, etc. because they're attached to an object (prototype or otherwise).

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree, this is the only one that is needed. Can you please restore the other ones?

@benjamingr

Nice work. Please feel free to also give us any feedback about the onboarding process today.

Note that JavaScript functions are automatically named when you assign them since ES2015.

LGTM on the change @mcollina approved, please amend the rest.

@XadillaX

@Trott

I think this PR could be closed due to #14297 (review).

There's one function in module.js that needs to be named, so this can stay open in the hopes that the original submitter updates it or possibly an existing Collaborator can come along and update it.

@BridgeAR

Closing due to long inactivity.

@BridgeAR

@ranstyr please feel free to reopen if you want to follow up on this!