choojs / hyperx

🏷 - tagged template string virtual dom builder
BSD 2-Clause "Simplified" License
1.01k stars 48 forks source link

Boolean `false` converted to string "false" #42

Closed jorgebucaran closed 6 years ago

jorgebucaran commented 7 years ago

This makes it difficult (or impossible?) for a virtual DOM engine to determine whether the user meant false or "false".

html`${true}` // yields true
html`${false}` // yields "false"
screen shot 2017-02-17 at 1 02 04

If this is indeed determined to be a bug, I'd be delighted to help with if you'd be so kind to offer some help by pointing out where should I start looking in the code.

Cheers! 👋

slaskis commented 7 years ago

There's a PR to fix this: https://github.com/substack/hyperx/pull/35

jorgebucaran commented 7 years ago

@slaskis Why hasn't it been merged? 🤔

slaskis commented 7 years ago

In part because of this which might make it a possible breaking change for some. So I just wanted it reviewed/accepted by someone first.

But then I don't use this library much anymore so I kind of forgot 🤷‍♂️

jorgebucaran commented 7 years ago

Thanks. I think we can all agree hyperx should be agnostic about vdom implementations. So, perhaps your PR could be merged and that str.replace issue taken upstream to virtual-dom?

jorgebucaran commented 7 years ago

@substack Do you think #35 can be merged?