Skip to content

Nobodyno-boop/Poulpe

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Poulpe

Simple Data binding Javascript Project

CodeFactor

Feature

  • Data binding with text or HTMLElement
  • Simple and speed.
  • Multi Option
  • Event system

How to use

import for the latest version from unpkg cdn poulpe.js

and see sample.

Dom

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()




text

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();

Other

change log


Event State

  • 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();

Option

Poulpe use Parcel for build this package.