https://github.com/xeonjs-org/jsx2xset-babel-plugin
https://github.com/xeonjs-org/jsx2xset-babel-plugin
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/xeonjs-org/jsx2xset-babel-plugin
- Owner: xeonjs-org
- License: mit
- Created: 2022-01-06T06:32:34.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2022-01-21T08:47:22.000Z (over 3 years ago)
- Last Synced: 2025-04-03T10:01:40.470Z (about 2 months ago)
- Language: JavaScript
- Size: 73.2 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# JSX2XSET
### Convert JSX Syntaxes to XSET(Xeon-Stack-Element-Tree) Object.```js
export default function App (props) {return (
Hello World
My name is Arif Sardar
);
}
```
### Convert this to :
```js
export default function App (props) {return ({
"name": "div",
"props": {
"attributes": {
"className": "container",
"id": "first-div",
"style": style.container
},
"children": [{
"name": "h1",
"props": {
"attributes": {
"style": {
color: "#fff",
backgroundColor: "#000"
}
},
"children": ["Hello World"]
}
}, {
"name": "h1",
"props": {
"attributes": {},
"children": ["My name is Arif Sardar"]
}
}]
}
});
```