An open API service indexing awesome lists of open source software.

https://github.com/vendicated/jsxml

XML-like object creation via JSX, because why the hell not!!
https://github.com/vendicated/jsxml

Last synced: about 1 year ago
JSON representation

XML-like object creation via JSX, because why the hell not!!

Awesome Lists containing this project

README

          

# JsxML

XML-like object creation via JSX, because why the hell not!!

## How do I use this?

Clone, edit index.jsx and run via
```sh
npm i
node run.mjs
```

## Example

```jsx
// jsx doesn't support @ in the tag? criiinge
const TypesNode = "@types/node";
console.log(
<>
JsxML
XML-like object creation via JSX
1.0.0

{/* If you want this as Number, mark it as num */}
42

{/* Or maybe run some js? */}
return Math.random() * 42;

{/* Automatically inferred as Array since authors is the plural of author */}


Vendicated

{/* Since this has no children, array type cannot be inferred. specify it manualy */}


^0.15.12


18.11.6

>
);
```

When you compile and run it, you get
```js
{
name: 'JsxML',
description: 'XML-like object creation via JSX',
version: '1.0.0',
SomeNumber: 42,
scriptRes: 30.36912272363861,
authors: [ { name: 'Vendicated' } ],
keywords: [],
dependencies: { esbuild: '^0.15.12' },
devDependencies: { '@types/node': '18.11.6' }
}
```

## Why?????

Why not ![](https://cdn.discordapp.com/emojis/1032974662122098698.webp?size=160&quality=lossless)

## Should I use this?

Absolutely, this is the most useful javascript library ever made