Simple Data binding Javascript Project
- Data binding with text or HTMLElement
- Simple and speed.
- Multi Option
- Event system
import for the latest version from unpkg cdn poulpe.js
and see sample.
HTML code.
<div id="#sample">i'm a {{animal}}</div>
JavaScript code.
const data = {animal: "Ocotpus"}
let poulpe = new Poulpe({element:document.getElementById("sample"), data:data});
poulpe.on("end", (x) => {
console.log(x) // x = HtmlElement
});
poulpe.run()
var text = "Hey i'm a {{animal}}";
var poulpe = new poulpe({element: text, data: {animal: "Octopus"}});
poulpe.on('end', (x) => {
console.log(x) // x = 'Hey i'm a Octopus'
});
poulpe.run();
- search
- find
- bind
- end
sample:
var poulpe = new poulpe({...});
poulpe.on('search', function(search){
console.log(search)
})
poulpe.on('find', function(find){
console.log(find)
})
poulpe.on('bind', function(bind){
console.log(bind)
});
poulpe.on('end', function(end){
console.log(end)
});
poulpe.run();
Poulpe use Parcel for build this package.