@webex/common-evented

3.0.0 • Public • Published

@webex/common-evented

standard-readme compliant

Class property decorator the adds change events to properties

Install

npm install --save @webex/common-evented

Usage

const evented = require(`@webex/common-evented`);
const Events = require(`ampersand-events`);

class X extends Events {
  @evented
  prop = null;
}

const x = new X();
x.on(`change:prop`, () => {
  console.log(x.prop);
  // => 6
});
x.prop = 6;

Maintainers

This package is maintained by Cisco Webex for Developers.

Contribute

Pull requests welcome. Please see CONTRIBUTING.md for more details.

License

© 2016-2020 Cisco and/or its affiliates. All Rights Reserved.

Readme

Keywords

none

Package Sidebar

Install

npm i @webex/common-evented

Weekly Downloads

2,946

Version

3.0.0

License

MIT

Unpacked Size

8.96 kB

Total Files

10

Last publish

Collaborators

  • arun3528
  • npm.tropo
  • webex-jenkins
  • adamweeks
  • taymoork2
  • webex-components-publisher
  • webex-web-client