tdumitrescu / virtual-jade

Compile Jade templates to Hyperscript for Virtual DOM libraries
Other
31 stars 4 forks source link

JSON.stringify object attributes #30

Closed andrewpurcell closed 4 years ago

andrewpurcell commented 4 years ago

When passing down attributes to an element, it is no use to convert a javascript object into [object Object]. This PR adds a wrapper which stringifies all objects nested under the attrs key to make passing simple serializable objects seamless to the developer.

Why the attrs key only? this is how the wrapper key that snabbdom uses for attributes and I wanted to limit the scope of these conversions.

tdumitrescu commented 4 years ago

FYI you can drop Node 6 and 8 from .travis.yml to get the build passing, both past EOL now. Can you add 12 while you're there?

tdumitrescu commented 4 years ago

Published (with some minor tweaks) in v0.12.0. Thanks!