Learn about our RFC process, Open RFC meetings & more.Join in the discussion! »

pub-sub-callback-api

1.1.1 • Public • Published

pub-sub-callback-api

Bower npm License Dependency Status devDependencies Status

class Person
  @include Initializable
  @include PublisherSubscriber
  @include Callbacks
  
  constructor: ({@name, @age}) -> @initialize.apply(thisarguments)
  
  @callback on: 'change:name',               -> # do stuff 
  @callback on: 'change:age'if: 'isAdult'-> # do stuff 
  
  isAdult: -> @age > 18

Install

npm i pub-sub-callback-api

DownloadsWeekly Downloads

2

Version

1.1.1

License

MIT

Last publish

Collaborators

  • avatar