# var-jsx

> It's jsx translator that can easily be used ```js const {jsx} = require(`jsx`); ``` it's done!\ now you can use `jsx.translate` to translate ```js jsx.translate(`const a = hi!`); ``` ```js const a = Var.make(`a`,[],Var.text(`hi!`));

Latest version **1.1.1** (published 2022-03-17) · ISC license · 0 weekly downloads

## Install

```sh
npm install var-jsx
pnpm add var-jsx
yarn add var-jsx
bun add var-jsx
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.1 |
| Published | 2022-03-17 |
| First published | 2022-03-13 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 25.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | exmuh |

## Links

- npm: https://www.npmjs.com/package/var-jsx
- npm.io page: https://npm.io/package/var-jsx

## Dependencies (2)

- [ts-node](https://npm.io/package/ts-node.md) ^10.7.0
- [typescript](https://npm.io/package/typescript.md) ^4.6.2

## Recent versions

- 1.1.1 (latest) — 2022-03-17
- 1.1.0 — 2022-03-16
- 1.0.9 — 2022-03-16
- 1.0.8 — 2022-03-16
- 1.0.7 — 2022-03-16
- 1.0.6 — 2022-03-14
- 1.0.5 — 2022-03-13
- 1.0.4 — 2022-03-13
- 1.0.3 — 2022-03-13
- 1.0.2 — 2022-03-13
- 1.0.1 — 2022-03-13
- 1.0.0 — 2022-03-13

## README

# Var - Jsx
It's jsx translator that can easily be used
```js
const {jsx} = require(`jsx`);
```
it's done!\
now you can use `jsx.translate` to translate
```js
jsx.translate(`const a = <div>hi!</div>`);
```
```js
const a = Var.make(`a`,[],Var.text(`hi!`));
```
you can also customize the returning code
```js
jsx.setting = {
    "domMaker" : "make",
    "textMaker" : "text",
    "stateMaker" : "state",
    "changeMaker" : "change"
}
```
if you want to use variables, try this
```html
const a = <div><-variable-></div>;
```
```js
const a = Var.make(`div`,[],Var.change(variable));
```
### domMaker
dom maker function is the function that should function as making virtual dom\
```js
const domMakerName = (name,states, ...child) => {
    //name : string
    //states : Array<{name, date}>
    //...child : virtualDom
};
```
### textMaker
textMaker function should function as making text virtual dom
```js
const textMakerName = (data) => {
    //data : string
};
```
### stateMaker
stateMaker function should function as making state
```js
const stateMakerName = (name,data) => {
    //name : string
    //data : string
}
```
### changeMaker
changeMaker function should function\
 as change variable (whose type isn't virtualDom) to virtualDom
```js
const changeMakerName = (data) => {
    //data : any
}
```

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