Skip to content

util: add support for `maxArrayLength` when inspecting `Set` and `Map`

related #42933 (closed)

This PR added maxArrayLength option to Set and Map. Currently the string print of Set and Map with many entries is a little unreadable since all entries are printed at once. On the contrary, this is not the case at a large array since the print will cut off thanks to maxArrayLength option.

It is inconsistent that maxArrayLength supports WeakMap and WeakSet but not Map and Set and I think supporting them will be helpful for users.

Merge request reports

Loading