
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
callbag-html
Advanced tools
An html markup library for callbag
const { div, span, br } = require('callbag-html')
const { pipe, map, interval } = require('callbag-basics')
// A callbag stream of an HTMLElement
const clock =
pipe(
interval(1000),
map(() => span(`The time is ${new Date().toString()}`))
)
document.body.appendChild(
div([
span('The time is:'), // Can accept ordinary markup
br(), // Variadic functions for clean looking markup
clock // Accepts callbag streams of elements!!
])
)
The API is very similar to r-dom's, except that
it can accept callbag streams for seamless interop and it returns real HTMLElements
This doc assumes the library was imported as const h = require('callbag-html'). The function is variadic:
h[tagName]([innerText])Returns an HTMLElement
String - An HTMLElement tag nameString - The innerText of the elementh[tagName]([children])Returns an HTMLElement
String - An HTMLElement tag nameArray[HTMLElement|Stream[HTMLElement]] - An array where each element can be an
HTMLElement or a callbag stream of an HTMLElementh[tagName]([children$])Returns an HTMLElement
String - An HTMLElement tag nameStream[Array[HTMLElement|Stream[HTMLElement]]] - A callbag stream of an array where each element can be an
HTMLElement or a callbag stream of an HTMLElementh[tagName]([properties], [innerText])Returns an HTMLElement
String - An HTMLElement tag nameObject - An object with property/value pairsString - The innerText of the elementh[tagName]([properties], [children])Returns an HTMLElement
String - An HTMLElement tag nameObject - An object with property/value pairsArray[HTMLElement|Stream[HTMLElement]] - An array where each element can be an
HTMLElement or a callbag stream of an HTMLElementh[tagName]([properties], [children$])Returns an HTMLElement
String - An HTMLElement tag nameObject - An object with property/value pairsStream[Array[HTMLElement|Stream[HTMLElement]]] - A callbag stream of an array where each element can be an
HTMLElement or a callbag stream of an HTMLElementproperties
{ id: 'foo', style: { fontSize: '12px' }, className: 'bar', classSet: { toggled: true } }children
[span('foo'), span('bar'), span('baz')][pipe(interval(1000), map(n => span(n))), span('!')]pipe(interval(500), map(n => [span('N = '), strong(n)]))Run npm run watch to generate the test bundle, served by default on localhost:1234
See LICENSE
FAQs
An html markup library for callbag
We found that callbag-html demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.