Boolean `false` converted to string "false"
See original GitHub issueThis 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"
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! 👋
Issue Analytics
- State:
- Created 7 years ago
- Comments:5
Top Results From Across the Web
How can I convert a string to boolean in JavaScript?
If you want string 'true' to return boolean true and string 'false' to return boolean false , then the simplest solution is to...
Read more >Convert String to Boolean in JavaScript - Stack Abuse
The simplest way to do so is to use the strict equality operator to compare our string value to the "true" - if...
Read more >2 Ways to Convert Values to Boolean in JavaScript
The first ! coerce the value to a boolean and inverse it. In this case, !value will return false . So to reverse...
Read more >How to convert string to boolean JavaScript - Educative.io
In this shot, we will cover how to convert a string into its boolean representation. The easiest way to convert string to boolean...
Read more >How to Convert Bool (True/False) to a String in Python? - Finxter
To convert a given Boolean value to a string in Python, use the str(boolean) function and pass the Boolean value into it. This...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@substack Do you think #35 can be merged?
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?