Skip to content
This repository has been archived by the owner on Mar 5, 2020. It is now read-only.

(Feature parity) Ignore null/undefined value for attributes #35

Closed
saschanaz opened this issue Jul 30, 2019 · 1 comment
Closed

(Feature parity) Ignore null/undefined value for attributes #35

saschanaz opened this issue Jul 30, 2019 · 1 comment
Labels

Comments

@saschanaz
Copy link

saschanaz commented Jul 30, 2019

require("viperhtml")`<tag attr=${null} />`.toString()

hyperHTML removes attr while viperHTML emits attr="null".

@WebReflection
Copy link
Owner

the current optimizations over prefixed strings doesn't allow me to easily do that, so that passing null || '' might be a better work around.

I have written in the README the current status of this library:
https://github.com/WebReflection/viperHTML#warning

It's been a great first of a kind, but it would take a lot of effort to fully align it with hyperHTML at this point, which is way more successful and used than this project.

Apologies if this was not the kind of answer you were expecting, but I am also sure you moved somewhere else since June 2019.

Closing as won't fix, thanks for your understanding.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants