vConsole icon indicating copy to clipboard operation
vConsole copied to clipboard

`Symbol.toStringTag` support is missing

Open CetinSert opened this issue 2 years ago • 4 comments
trafficstars

vConsole Version: 3.15.0 ignores Symbol.toStringTag

const user = {
  firstName: 'John',
  lastName: 'Doe',
  [Symbol.toStringTag]: 'User',
}; user

vConsole ❌ | ✔️ Chrome DevTools image

Please add support for this!

CetinSert avatar Feb 27 '23 12:02 CetinSert

Add support for

  • [ ] Set
  • [ ] Map
  • [ ] Request
  • [ ] Headers
  • [ ] Response

CetinSert avatar Mar 06 '23 18:03 CetinSert

You can see these properties after expanding

image

Maizify avatar Jun 01 '23 08:06 Maizify

@Maizify – It should do so before expanding to better match native consoles, otherwise vConsole is not doing a good job (of virtualizing).

Given,

const user = {
  firstName: 'John',
  lastName: 'Doe',
  [Symbol.toStringTag]: 'User',
}; user
  • vConsole output just reads Object {firstName: "John", lastName: "Doe"} without expanding the object!
  • native console output reads User {firstName: "John", ... even without expanding. native

Native consoles also output Set, Map, Request, Headers, and Response better than vConsole.

CetinSert avatar Jun 02 '23 06:06 CetinSert

@Maizify – see https://github.com/liriliri/eruda

CetinSert avatar Jun 27 '23 01:06 CetinSert