@ntix/bind
TypeScript icon, indicating that this package has built-in type declarations

1.3.2 • Public • Published

@ntix/bind

A small dom binder

Build Status Greenkeeper badge npm version

Documentation and working example

example

<button bind [inner-text]="text" {click}="onClick"></button>

<script type="module">
  import { bind } from './bind.js';

  const context = {
    text: 'click me',
    onClick: e => {
      e.stopPropagation();

      context.text = 'thanks!';
      setTimeout(() => {
        context.text = 'click me again';
      }, 2000);
    }
  };

  bind(document, context);
</script>

/@ntix/bind/

    Package Sidebar

    Install

    npm i @ntix/bind

    Weekly Downloads

    0

    Version

    1.3.2

    License

    ISC

    Unpacked Size

    12.2 kB

    Total Files

    24

    Last publish

    Collaborators

    • antix