# jito

> Web component tools with Data Binding, Template Engine and Virtual Dom for ESM.

Latest version **1.5.0** (published 2024-10-26) · MIT license · 0 weekly downloads

## Install

```sh
npm install jito
pnpm add jito
yarn add jito
bun add jito
```

## Health

**Score 35/100 (D)** — status: maintenance-mode.

Positive: has types; esm support; no vulnerabilities.

Warnings: low downloads.

Negative: stale; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.5.0 |
| Published | 2024-10-26 |
| First published | 2022-07-21 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 73.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 8 |
| Author | Nakamura |
| Maintainers | ittedev |
| Keywords | jito, spa, router, framework |

## Links

- npm: https://www.npmjs.com/package/jito
- Repository: https://github.com/ittedev/jito
- Homepage: https://github.com/ittedev/jito#readme
- Issues: https://github.com/ittedev/jito/issues
- npm.io page: https://npm.io/package/jito

## Alternatives

- [express-promise-router](https://npm.io/package/express-promise-router.md) — 736.1K weekly downloads
- [next-usequerystate](https://npm.io/package/next-usequerystate.md) — 29.8K weekly downloads
- [@bitkyc08/opencodex](https://npm.io/package/@bitkyc08/opencodex.md) — 4.6K weekly downloads
- [lynkr](https://npm.io/package/lynkr.md) — 575 weekly downloads
- [baremetal.js](https://npm.io/package/baremetal.js.md) — 42 weekly downloads

## Recent versions

- 1.5.0 (latest) — 2024-10-26
- 1.4.2 — 2024-04-07
- 1.4.0 — 2023-08-20
- 1.3.4 — 2023-05-30
- 1.3.3 — 2023-05-28
- 1.3.2 — 2023-05-27
- 1.3.1 — 2023-05-26
- 1.2.2 — 2023-04-30
- 1.2.1 — 2023-04-23
- 1.2.0 — 2023-04-15
- 1.1.1 — 2023-04-09
- 1.1.0 — 2022-12-09
- 1.0.9 — 2022-12-04
- 1.0.8 — 2022-12-04
- 1.0.7 — 2022-11-18
- … 6 more at https://npm.io/package/jito/versions

## README

# Jito

<p align="center"><img src="https://cdn.jitoin.com/images/jito-docs/jito.png" width="150" height="150"></p>

## What is Jito?

Jito is a JavaScript web component framework with Data Binding, Template Engine, Virtual DOM and routing.

You can experience single page application development with just a web browser.

![GitHub release (latest by date)](https://img.shields.io/github/v/release/ittedev/jito)
![GitHub](https://img.shields.io/github/license/ittedev/jito)

## Document

- [日本語](https://zenn.dev/itte/books/5ce6aac9166aed)
- [English (DeepL Translation)](./docs/)

## First Example

Please save the following code as `example.html` and try opening it in your web browser. A counter that counts up every time you click.

```html
<!DOCTYPE html>
<meta charset="UTF-8">
<body></body>
<script type="module">
  import { watch, mount } from 'https://cdn.jsdelivr.net/gh/ittedev/jito@1.5.0/jito.js'

  let state = watch({
    count: 0
  })

  let html = `
    Counter: {| count |}
    <button onclick="count++">Add</button>
  `

  mount(document.body, html, state)
</script>
```

## Examples

[Glitch Examples](https://glitch.com/@ittedev/jito-examples)

## Import

Jito use ES Modules.

No installation is required to use Jito.
Just browse to a single `jito.js` file from your web browser to start using Jito.

### From a local file

You can download the latest version of the `jito.js` file from [Releases](https://github.com/ittedev/jito/releases).

```js
<script type="module">
  import { ... } from './jito.js'
  ...
</script>
```

### From CDN

From jsDelivr.

```js
<script type="module">
  import { ... } from 'https://cdn.jsdelivr.net/gh/ittedev/jito@1.5.0/jito.js'
  ...
</script>
```

### For Deno

Distributed for Deno on [deno.land/x](https://deno.land/x/jito).

See the following It needs to be built for browsers at [esbuild](https://esbuild.github.io/), etc.

```ts
import { ... } from 'https://deno.land/x/jito@1.5.0/mod.ts'
```

### For Node.js

It is distributed via npm for Node.js.

For Node.js, installation is required with the following command.

```sh
npm i jito
```

See the following It needs to be built for browsers at [esbuild](https://esbuild.github.io/), etc.

```ts
import { ... } from 'jito'
```


# Functions

Jito consists of APIs categorized as data binding, virtual DOM, template engine, web component, and routing. APIs are mainly provided as functions.

To use the functions, import them from their respective files as follows.

| API | File | Functions | Browser | Server |
| --- | --- | --- | --- | --- |
| Data Binding | jito.js | watch, unwatch, reach, unreach, change, lock, unlock | ✓ | ✓ |
| Virtual DOM | jito.js | load, patch | ✓ |  |
| Template Engine | jito.js | parse, evaluate, snip, pickup, assign | ✓ | ✓ |
| Web Components | jito.js | compact, mount, define, elementize | ✓ |  |
| Routing | routing.js | walk | ✓ |  |


# Next

2. [Tutorial](./docs/Tutorial.md)

---
_Source: https://npm.io/package/jito · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
