1.0.10 • Published 2 years ago

@xeonjs/jsx2xset v1.0.10

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

JSX2XSET

Convert JSX Syntaxes to XSET(Xeon-Stack-Element-Tree) Object.

export default function App (props) {

      return (
            <div className="container" id="first-div" style={style.container}>
                  <h1 style={{ color: "#fff", backgroundColor: "#000" }}>Hello World</h1>
                  <h1>My name is Arif Sardar</h1>
            </div>
      );
}

Convert this to :

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"]
                        }
                  }]
            }
      });
1.0.10

2 years ago

1.0.9

2 years ago

1.0.8

2 years ago

1.0.7

2 years ago

1.0.6

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago