two-way-binding

1.0.2 • Public • Published

Two Way

The simplest javascript two-way binding with 36 lines.

preview

Live demo & playground at here

Getting Started

twoWay(object,input);
//access object.value will be input.value ( input.checked for checkbox )

If I want to have a notice when the value updated ?

twoWay(object,input)
  .onUpdated(val=>{
    //do what you like
  })
  .onUpdated(val=>{
    //pretty cool. isn't it ?
  })

Readme

Keywords

Package Sidebar

Install

npm i two-way-binding

Weekly Downloads

0

Version

1.0.2

License

MIT

Last publish

Collaborators

  • xingoxu