3 ms·
Tip to make the stack traces better in javascript: name all of your anonymous functions. For example, request.on('data', function requestReceivedData() {
by cliftonk 14y ago
Tip to make the stack traces better in javascript: name all of your anonymous functions.
For example,
request.on('data', function requestReceivedData() { ... });
- firefoxman1 14y agoI've recently started doing this as well. You also get a performance boost if you define the functions once at the top and then do this: request.on('data', requestReceivedData)