| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Render all properties of nodeTiming enumerable so JSON.stringify and Object.keys can access them Fixes: nodejs#35936
Sorry, something went wrong.
Improve readability as per @aduh95 suggestion Refs: nodejs#35977
Transform the static values to plain properties (@addaleax review) Refs: nodejs#35977
|
Actually, I’d make all of these configurable … it can be nice to be able to override them for testing purposes if that’s ever necessary |
Sorry, something went wrong.
Render all properties configurable (@addaleax review) nodejs#35977
| }, | ||
|
|
||
| idleTime: { | ||
| ...PerformanceNodeTimingProps, |
There was a problem hiding this comment.
Non-blocking: I would just include the properties directly here (rather than use the repeated `...PerformanceNodeTimingProps) even if they're going to be duplicated just to save an unnecessary performance cost.
Sorry, something went wrong.
There was a problem hiding this comment.
Hmm, do you think V8 keeps a reference to the initializing object when using the spread operator?
Sorry, something went wrong.
There was a problem hiding this comment.
Yeah, this is ECMA specified in fact
Sorry, something went wrong.
Render all properties of nodeTiming enumerable so JSON.stringify and Object.keys can access them Refs: nodejs#35977
Sorry, something went wrong.
Sorry, something went wrong.
|
Does this obviate the need for [util.inspect.custom]()? |
Sorry, something went wrong.
No, you still need it to get a pretty console output, you see [Getter] instead of the actual value without it |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Render all properties of nodeTiming enumerable
so JSON.stringify and Object.keys can access them
Fixes: #35936
Checklist