3.0.1 • Published 7 years ago

generate-js-bindings v3.0.1

Weekly downloads
3
License
MIT
Repository
github
Last release
7 years ago

Generate-JS-Bindings

GitHub release npm version npm downloads npm downloads

Table of Contents

Bindable

A generator for Bindable, lets you create an objects that you can bind functions to property changes, or generate a new generator that inherits from Bindable.

Install:

$ npm install generate-js-bindings

new Bindable()

  • return: Object A new object that inherits from Bindable.

Creates a new object that inherits from Bindable.

Bindable.generate(create)

  • create Function Create method that gets called when creating a new object that inherits from Bindable.
  • return: Generator A new generator that inherits from Bindable.

Returns a new generator that inherits from Bindable.

Class: Generation

A new generator that inherits from the generator that generated it using the Bindable.generate(create) method.

Class: Creation

A new object that inherits from the generator that created it using the Bindable.create() method.

Creation.bind(property, listener, observer)

  • property String Name of property.
  • listener Function Property change handler function.
  • observer Object Object reference for binding.
  • return: Object This object.

Adds a 'listener' on 'property' change to this Bindable instance.

Creation.bindOnce(property, listener, observer)

  • property String Name of property.
  • listener Function Property change handler function.
  • observer Object Object reference for binding.

  • return: Object This object.

Adds a 'listener' on 'property' change to this Bindable instance which is removed after one 'property' change.

Creation.unbind(property, observer)

  • property String Name of property.
  • listener Function Property change handler function.
  • observer Object Object reference for binding.
  • return: Object This object.

Removes a 'listener' on 'property', or all listeners on 'property', or all listeners from this Bindable instance.

Creation.change(property, oldValue, newValue, changer)

  • property String Name of property.
  • oldValue Any Old value of property.
  • newValue Any New value of property.
  • return: Object This object.

Emits an 'property' with 'args' on this Bindable instance.

3.0.1

7 years ago

3.0.0

7 years ago

1.0.10

9 years ago

1.0.9

9 years ago

1.0.8

9 years ago

1.0.7

9 years ago

1.0.6

9 years ago

1.0.5

9 years ago

1.0.4

9 years ago

1.0.3

9 years ago

1.0.2

9 years ago

1.0.1

9 years ago

1.0.0

9 years ago

0.0.0

9 years ago