summaryrefslogtreecommitdiff
path: root/lib/internal/util/inspect.js
AgeCommit message (Collapse)Author
2019-12-07util: never trigger any proxy traps using `format()`Ruben Bridgewater
PR-URL: https://github.com/nodejs/node/pull/30767 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Denys Otrishko <shishugi@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
2019-12-07util: improve performance inspecting proxiesRuben Bridgewater
This makes sure we do not retrieve the handler in case it's not required. This improves the performance a tiny bit for these cases. PR-URL: https://github.com/nodejs/node/pull/30767 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Denys Otrishko <shishugi@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
2019-12-07util: add more predefined color codes to inspect.colorsRuben Bridgewater
This adds most commonly used ANSI color codes to `util.inspect.colors`. PR-URL: https://github.com/nodejs/node/pull/30659 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com>
2019-12-07util: improve inspect's customInspect performanceRuben Bridgewater
This improves the performance to copy user options that are then passed through to the custom inspect function. The performance improvement depends on the complexity of the custom inspect function. For very basic cases this is 100% faster than before. PR-URL: https://github.com/nodejs/node/pull/30659 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com>
2019-11-30lib: enforce use of primordial NumberSebastien Ahkrin
PR-URL: https://github.com/nodejs/node/pull/30700 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2019-11-30lib: use static Number properties from primordialsMichaël Zasso
PR-URL: https://github.com/nodejs/node/pull/30686 Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
2019-11-30util: fix .format() not always calling toString when it should beRuben Bridgewater
This makes sure that `util.format('%s', object)` will always call a user defined `toString` function. It was formerly not the case when the object had the function declared on the super class. At the same time this also makes sure that getters won't be triggered accessing the `constructor` property. PR-URL: https://github.com/nodejs/node/pull/30343 Fixes: https://github.com/nodejs/node/issues/30333 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Denys Otrishko <shishugi@gmail.com> Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
2019-11-28util: fix inspection of errors with tampered name or stack propertyRuben Bridgewater
This makes sure that `util.inspect()` does not throw while inspecting errors that have the name or stack property set to a different type than string. Fixes: https://github.com/nodejs/node/issues/30572 PR-URL: https://github.com/nodejs/node/pull/30576 Reviewed-By: David Carlier <devnexen@gmail.com> Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
2019-11-27lib: enforce use of Array from primordialsMichaël Zasso
PR-URL: https://github.com/nodejs/node/pull/30635 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
2019-11-26util: use let instead of var for util/inspect.jsLuciano
PR-URL: https://github.com/nodejs/node/pull/30399 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2019-11-25lib: flatten access to primordialsMichaël Zasso
Store all primordials as properties of the primordials object. Static functions are prefixed by the constructor's name and prototype methods are prefixed by the constructor's name followed by "Prototype". For example: primordials.Object.keys becomes primordials.ObjectKeys. PR-URL: https://github.com/nodejs/node/pull/30610 Refs: https://github.com/nodejs/node/issues/29766 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2019-11-19util: escape C1 control characters and switch to hex formatRuben Bridgewater
C1 control characters will from now on also be escaped to prevent altering the terminal behavior. Fixes: https://github.com/nodejs/node/issues/29450 PR-URL: https://github.com/nodejs/node/pull/29826 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com>
2019-10-10util: validate formatWithOptions inspectOptionsRuben Bridgewater
This makes sure that the `inspectOptions` are validated. This could otherwise cause confusion. Fixes: https://github.com/nodejs/node/issues/29726 PR-URL: https://github.com/nodejs/node/pull/29824 Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Minwoo Jung <minwoo@nodesource.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com>
2019-10-05lib: introduce no-mixed-operators eslint rule to libZYSzys
PR-URL: https://github.com/nodejs/node/pull/29834 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2019-09-23console,util: fix missing recursion end while inspecting prototypesRuben Bridgewater
This makes sure prototypes won't be inspected infinitely for some obscure object creations. The depth is now taken into account and the recursion ends when the depth limit is reached. PR-URL: https://github.com/nodejs/node/pull/29647 Fixes: https://github.com/nodejs/node/issues/29646 Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com> Reviewed-By: Minwoo Jung <minwoo@nodesource.com>
2019-09-22console: skip/strip %c formattingGus Caplan
Fixes: https://github.com/nodejs/node/issues/29605 Refs: https://console.spec.whatwg.org PR-URL: https://github.com/nodejs/node/pull/29606 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com> Reviewed-By: David Carlier <devnexen@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2019-08-29util: do not throw when inspecting detached ArrayBufferAnna Henningsen
PR-URL: https://github.com/nodejs/node/pull/29318 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com> Reviewed-By: Gus Caplan <me@gus.host>
2019-06-27process: split routines used to enhance fatal exception stack tracesJoyee Cheung
Previously the enhancement were done right after emitting `'uncaughtException'`, which meant by the time we knew the exception was fatal in C++, the error.stack had already been patched. This patch moves those routines to be called later during the fatal exception handling, and split them into two stages: before and after the inspector is notified by the invocation of `V8Inspector::exceptionThrown`. We now expand the stack to include additional informations about unhandled 'error' events before the inspector is notified, but delay the highlighting of the frames until after the inspector is notified, so that the ANSI escape sequences won't show up in the inspector console. PR-URL: https://github.com/nodejs/node/pull/28308 Fixes: https://github.com/nodejs/node/issues/28287 Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
2019-06-27tools: update eslintRuben Bridgewater
This updates eslint from v6.0.0-alpha.2 to v6.0.1 This also removes eslint-disable comments about `bigint` typeof checks. Those would otherwise have caused linting errors now that `bigint` is accepted as valid entry. PR-URL: https://github.com/nodejs/node/pull/28173 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
2019-06-17util: use average bias while grouping arraysRuben Bridgewater
This makes sure that strongly deviating entry length are taken into account while grouping arrays. PR-URL: https://github.com/nodejs/node/pull/28070 Refs: https://github.com/nodejs/node/issues/27690 Reviewed-By: James M Snell <jasnell@gmail.com>
2019-06-17util: improve .inspect() array groupingRuben Bridgewater
This improves a couple minor things: * Arrays that contain entries other than `number` or `bigint` are ordered to the left instead of the right. * The bias towards more columns got increased. That mainly increases the number of columns for arrays that contain lots of short entries. * Columns are now more dense in case they would otherwise have extra whitespace in-between two columns. * The maximum columns got increased from 10 to 15. * The maximum number of columns per `compact` was increased from 3 to 4. PR-URL: https://github.com/nodejs/node/pull/28070 Refs: https://github.com/nodejs/node/issues/27690 Reviewed-By: James M Snell <jasnell@gmail.com>
2019-06-11util: refactor inspecting long linesRuben Bridgewater
Using the `util.inspect` `compact` mode set to something else than `true` resulted in breaking long lines in case the line would exceed the `breakLength` option and if it contained whitespace and or new lines. It turned out that this behavior was less useful than originally expected and it is now changed to only break on line breaks if the `breakLength` option is exceeded for the inspected string. This should be align better with the user expectation than the former behavior. PR-URL: https://github.com/nodejs/node/pull/28055 Fixes: https://github.com/nodejs/node/issues/27690 Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
2019-06-09util: special handle `maxArrayLength` while grouping arraysRuben Bridgewater
This makes sure that large arrays with lots of small entries ignore the `... n more item(s)` part since it often resulted in output that users did not expect. Now that part is printed on a separate line to indicate extra entries. PR-URL: https://github.com/nodejs/node/pull/28059 Refs: https://github.com/nodejs/node/issues/27690 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
2019-06-08util: support AsyncGeneratorFunction in .inspectRuben Bridgewater
This makes sure async generator functions are properly detected while using `util.inspect`. PR-URL: https://github.com/nodejs/node/pull/28056 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
2019-05-20util: include reference anchor for circular structuresRuben Bridgewater
This adds a reference anchor to circular structures when using `util.inspect`. That way it's possible to identify with what object the circular reference corresponds too. PR-URL: https://github.com/nodejs/node/pull/27685 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
2019-05-20util: if present, fallback to `toString` using the %s formatterRuben Bridgewater
This makes sure that `util.format` uses `String` to stringify an object in case the object has an own property named `toString` with type `function`. That way objects that do not have such function are still inspected using `util.inspect` and the old behavior is preserved as well. PR-URL: https://github.com/nodejs/node/pull/27621 Refs: https://github.com/facebook/jest/issues/8443 Reviewed-By: Roman Reiss <me@silverwind.io>
2019-05-20util: remove outdated commentRuben Bridgewater
It is probably not necessary to visualize the `code` property as part of the name of an error since all extra properties will be visible anyway due to https://github.com/nodejs/node/pull/272431. PR-URL: https://github.com/nodejs/node/pull/27733 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com>
2019-05-20util: unify constructor inspection in `util.inspect`Ruben Bridgewater
This makes sure that an objects constructor name is always returned in a similar fashion instead of having different outputs depending on the object shape and the code path taken. PR-URL: https://github.com/nodejs/node/pull/27733 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com>
2019-05-20util: simplify inspection limit handlingRuben Bridgewater
This simplifies the handling of objects that exceed 128mb. Instead of using a separate property to identify that all following inputs should only return their constructor name it'll just set the depth to -1. That has the almost the same behavior as before while providing a better output in some cases. The performance should be almost identical as well. PR-URL: https://github.com/nodejs/node/pull/27733 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com>
2019-05-16util: reconstruct constructor in more casesRuben Bridgewater
This makes sure the constructor is reconstructed in cases where we otherwise would not be able to detect the actual constructor anymore. That way some `util.inspect` output is improved. PR-URL: https://github.com/nodejs/node/pull/27668 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com>
2019-05-10tools: enable block-scoped-var eslint ruleRoman Reiss
PR-URL: https://github.com/nodejs/node/pull/27616 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2019-05-04util: inspect constructor closerRuben Bridgewater
This adds an extra check to `util.inspect` to closer inspect object constructors in case there's not much other information about the constructor. PR-URL: https://github.com/nodejs/node/pull/27522 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
2019-05-02util: better number formattersRuben Bridgewater
This makes sure the `%d`, `%f`, `%i` and `%s` formatters properly visualize `-0`. On top, this also switches to using a safer symbol toString function by using the primordial function. PR-URL: https://github.com/nodejs/node/pull/27499 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Rich Trott <rtrott@gmail.com>
2019-05-02util: improve function inspectionRuben Bridgewater
This commit contains the following changes: 1) Add null prototype support for functions. 2) Safely detect async and generator functions. 3) Mark anonymous functions as such instead of just leaving out the name. PR-URL: https://github.com/nodejs/node/pull/27227 Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: John-David Dalton <john.david.dalton@gmail.com> Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
2019-04-26util: add prototype support for boxed primitivesRuben Bridgewater
This makes sure manipulated prototypes from boxed primitives will be highlighted. It also makes sure that a potential `Symbol.toStringTag` is taken into account. PR-URL: https://github.com/nodejs/node/pull/27351 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: John-David Dalton <john.david.dalton@gmail.com> Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com>
2019-04-25util: rename setIteratorBraces to getIteratorBracesRuben Bridgewater
The function is actually a getter, not a setter. PR-URL: https://github.com/nodejs/node/pull/27342 Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
2019-04-25util: improve `Symbol.toStringTag` handlingRuben Bridgewater
Only special handle `Symbol.toStringTag` if the property is not enumerable or not the own property of the inspected object. PR-URL: https://github.com/nodejs/node/pull/27342 Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
2019-04-15util: only sort weak entries onceRuben Bridgewater
This makes sure weak entries are only sorted once, while using the sorted option. PR-URL: https://github.com/nodejs/node/pull/27052 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: James M Snell <jasnell@gmail.com>
2019-04-15util: highlight stack framesRuben Bridgewater
Using `util.inspect` on errors is going to highlight userland and node_module stack frames from now on. This is done by marking Node.js core frames grey and frames that contain `node_modules` in their path yellow. That way it's easy to grasp what frames belong to what code. PR-URL: https://github.com/nodejs/node/pull/27052 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: James M Snell <jasnell@gmail.com>
2019-04-10util: change inspect compact and breakLength defaultRuben Bridgewater
This changes the `compact` default from `true` to `3`. That mode changes arrays to be grouped together, it alignes multiple small entries on a single line in similar to `compact` true but only for the most inner three depth levels and the closing brackets are always on the same indentation as the openeing of the object instead of at the same line as another property. Big strings will be naturally broken into multiple lines instead of having one huge line that is not well readable. The output size mainly stays the same that way while it will be smaller in case of big arrays. Increasing the `breakLength` to 80 adjusts for most terminals that support at least 80 characters in a single line and improves the general output that way. A lot of calculations use the `breakLength` to determine the concrete behavior. PR-URL: https://github.com/nodejs/node/pull/27109 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Minwoo Jung <minwoo@nodesource.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2019-04-10util: improve inspect edge casesRuben Bridgewater
This makes sure `compact` number mode causes small proxies and map entries to be printed on a single line. It also fixed the line break calculation for `compact` mode when not set to `true`. It now also adds the additional whitespace, comma and quotes to the formula to prevent exceeding the `breakLength`. PR-URL: https://github.com/nodejs/node/pull/27109 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Minwoo Jung <minwoo@nodesource.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2019-04-08lib: use safe methods from primordialsMichaël Zasso
This changes the primordials to expose built-in prototypes with their methods already uncurried. The uncurryThis function is therefore moved to the primordials. All uses of uncurryThis on built-ins are changed to import the relevant prototypes from primordials. All uses of Function.call.bind are also changed to use primordials. PR-URL: https://github.com/nodejs/node/pull/27096 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
2019-04-08buffer: fix custom inspection with extra propertiesRuben Bridgewater
This broke due to a recent change that prevents exposing inspect internals. It now relies on the public API instead and should be a bit more robust due to that. PR-URL: https://github.com/nodejs/node/pull/27074 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
2019-04-04util: use minimal object inspection with %s specifierRuben Bridgewater
This improves `util.format()` by returning more meaningful results when using `%s` as specifier and any object as value. Besides that `BigInt` will also be represented with an `n` at the end to indicate that it's of type `BigInt`. PR-URL: https://github.com/nodejs/node/pull/26927 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
2019-04-03lib: force using primordials for JSON, Math and ReflectMichaël Zasso
Use the "no-restricted-globals" ESLint rule to lint for it. PR-URL: https://github.com/nodejs/node/pull/27027 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2019-04-03util: improve error property inspectionRuben Bridgewater
This makes sure that errors that contain extra properties show those properties on a separate line. PR-URL: https://github.com/nodejs/node/pull/26984 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2019-04-03util: improve `inspect()` compact number modeRuben Bridgewater
This fixes a proportion calculation for lots of short array entries with at least one bigger one that alone makes up for more than one fifth of all other entries together. PR-URL: https://github.com/nodejs/node/pull/26984 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2019-04-03util: `inspect()` should not exceed `breakLength`Ruben Bridgewater
Using `util.inspect()` with the `compact` option set to a number could result in output that exceeded the `breakLength` option. This change makes sure that limit is taken into account. PR-URL: https://github.com/nodejs/node/pull/26914 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2019-03-30util: add subclass and null prototype support for errors in inspectRuben Bridgewater
This adds support to visualize the difference between errors with null prototype or subclassed errors. This has a couple safeguards to be sure that the output is not intrusive. PR-URL: https://github.com/nodejs/node/pull/26923 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com>
2019-03-29util: fix map entries inspectionRuben Bridgewater
This makes sure the arrays returned by Map#entries() are handled as any other array instead of just visualizing the entries as array. Therefore options should have an impact on the arrays. PR-URL: https://github.com/nodejs/node/pull/26918 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Michaël Zasso <targos@protonmail.com>