Skip to content
/ pollu Public

🛠️ compiler that makes html to javascript code

License

Notifications You must be signed in to change notification settings

do4ng/pollu

Repository files navigation

pollu.js

🐱 github 🤖 download


compile html to javascript code.
You need only one of HTML file to render lots of data...

Features

It uses document.appendChild instead of document.write
Difference between appendChild and document.write

Usage

import { transform } from 'pollu';

writeFileSync('index.js', transform('<div>Hello World</div>').js);
<script src="index.js"></script>

output: Hello World

see example in playground

Browser-Support

<script src="https://unpkg.com/pollu/dist/browser.js" type="module"></script>
// check browser support
console.log(window.Pollu.transform);