Chakroun-Anas / turbo-console-log

600 stars 141 forks source link

[FEATURE REQUEST] Deep Object #211

Closed angelhdzdev closed 1 year ago

angelhdzdev commented 1 year ago

You have been working a lot, so please take this as Low Priority.

I noticed that in an object literal, it only works with the first level properties.

const user = {
  data: {
    name: 'asd'
  }
}
console.log("🚀 ~ file: login.post.ts:44 ~ user.data:", user.data)
const user = {
  data: {
    name: 'asd'
  }
    console.log("🚀 ~ file: login.post.ts:43 ~ name:", name) // ERROR: "," expected.
}

Idea

If this is complicate to implement, then I suggest detecting if the variable is an object and wrap it between JSON.stringify() to log all properties altogether instead:

const user = {
  data: {
    name: 'asd',
  }
}
console.log("🚀 ~ file: login.post.ts:44 ~ user:", JSON.stringify(user))

Amazing job! 🔥🤯🤝

Chakroun-Anas commented 1 year ago

Hello @angelhdzmultimedia,

Thank you very much for your very valuable contributions and your kind words ❤️, i had this in mind once i pushed the version that deals with logging a one level object property, very nice catch from you 😉.

This should be a very nice little challenge, will deal with it ASAP no worries 💪

Greetings

Chakroun-Anas commented 1 year ago

Hello @angelhdzmultimedia,

Version v2.9.3 is live in the store handling this issue well hopefully 🥳, as usual thank you in advance to check again so that we close this one and move to others.

PS: It was fun to implement 😁

Greetings

angelhdzdev commented 1 year ago

image

image

😂😍🔥🤝🎉 Let's get ready for Turboooooo!!! Greetings.