1.2.1 • Published 2 years ago

@itsy/h v1.2.1

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

h

install

pnpm add -D @itsy/h

use

import { h } from '@itsy/h'

h('h1', { class: 'omg' }, 'Hello world!')

api

The h function can take two or three primary arguments. In the three-argument form, an options-object is also available.

  • tag: The HTML tag to create
  • attrs: An object of HTML attributes - e.g. { id: 'foo' } would create id="foo"
  • children: A string or array of strings containing child-content for the parent
  • opts: An options-object
    • opts.escape: Will HTML-escape children

h(tag, attrs | children)

h(tag, attrs, children, opts?)

1.2.1

2 years ago

1.2.0

3 years ago

1.1.1

3 years ago

1.1.0

3 years ago

1.0.0

3 years ago

0.0.1

3 years ago