Socket
Socket
Sign inDemoInstall

bik

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bik - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

4

package.json
{
"name": "bik",
"version": "1.0.0",
"description": "Tiny library for isolated web components",
"version": "1.0.1",
"description": "A tiny component toolkit",
"main": "index.js",

@@ -6,0 +6,0 @@ "scripts": {

# bik
Tiny library for isolated web components
A tiny component toolkit

@@ -11,20 +11,20 @@ ## installation

```javascript
var bik = require('..')
var bik = require('bik')
var html = require('nanohtml')
var counter = bik({count: 0}, function (t) {
return html`
<div onclick="${click}">Count is ${t.count}</div>
`
return html`
<div onclick="${click}">Count is ${t.count}</div>
`
function click() {
t.count++
t.r()
}
function click() {
t.count++
t.r()
}
})
counter.load = function (el) {
el.innerHTML += ' (fresh!)'
el.innerHTML += ' (fresh!)'
}
counter.afterupdate = function (el) {
el.innerHTML += ' (updated!)'
el.innerHTML += ' (updated!)'
}

@@ -35,9 +35,10 @@

It should also work standalone in the browser by including `build/bik.min.js`.
It should also work standalone in the browser by including `build/bik.min.js`. It provides a global `bik` function.
## why?
I love [`choo`](https://github.com/choojs/choo) but sometimes you don't want to use it as the base of a site. For example when I want to use a single component (example: counter, list, responsive menu). It can also be used to build components as modules.
Uses [`nanomorph`](https://github.com/choojs/nanomorph) under the hood and you need [`nanohtml`](https://github.com/choojs/nanohtml) or something similar.
I love [`choo`](https://github.com/choojs/choo) and how it handles components so I wanted to have a similar experience in cases where choo isn't used. For example when I want to use a single awesome-component (ex: counter, list, responsive menu). It can also be used to build components as modules.
Uses [`nanomorph`](https://github.com/choojs/nanomorph) under the hood and you need [`nanohtml`](https://github.com/choojs/nanohtml) or a similar way to generate DOM.
## api

@@ -61,1 +62,6 @@ ### `component(root) = bik(initialstate, handler(component))`

The component's DOM Node.
## inspiration
- [choo](https://github.com/choojs/choo)
- [nanocomponent](https://github.com/choojs/nanocomponent)
- [dot-dom](https://github.com/wavesoft/dot-dom)
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc