@small-tech/vhtml

1.0.0 • Public • Published

vhtml

Fork of vhtml optimised for Kitten

Fork of vhtml by Jason Miller optimised for use by Kitten.

If you’re wondering which module to use, you probably should use Jason’s original one.

What’s different

The differences are mostly due to Kitten’s tagged templates targetting HTML rather than JSX.

  • Boolean HTML attributes are output as just the name of the attribute, not attribute="true" (e.g.,h('main', {hidden: true}) is rendered as <div hidden></div>, not <div hidden="true"></div>)

  • <style>…</style> tags are not escaped, so you can use quotation marks in them.

Other differences:

  • Moved repository to Codeberg.
  • Removed some optimisations (minification, etc.) that don’t make sense for Kitten’s use case.
  • Migrated tests to tape.
  • Made the module ESM-only to keep things simple.
  • New npm package name.

Installation

Via npm:

npm install @small-tech/vhtml

Usage

See vhtml

License

MIT (as per the original module)

Package Sidebar

Install

npm i @small-tech/vhtml

Weekly Downloads

0

Version

1.0.0

License

MIT

Unpacked Size

10.6 kB

Total Files

6

Last publish

Collaborators

  • aral