0.3.1 • Published 9 years ago

ows v0.3.1

Weekly downloads
4
License
MIT
Repository
github
Last release
9 years ago

ows

Build Status GitHub version License

Simple observable like WeakSet

npm i ows

Usage

import OWS from 'ows';

const ows = new OWS();

ows.on(set => {});
ows.add('val'); // => emit change event

Methods

.on(handler)

inherit EventEmitter

Returns ows

.off(handler)

inherit EventEmitter

Returns ows

.add(payload);

add payload

successful emit change event

Returns ows

.delete(payload);

delete payload

successful emit change event

Returns Bool

.has(payload);

has payload

Returns Bool

.clear(payload);

clear set

successful emit change event

Returns ows

Contributing

  1. Fork it!
  2. Create your feature branch: git checkout -b my-new-feature
  3. Commit your changes: git commit -am 'Add some feature'
  4. Push to the branch: git push origin my-new-feature
  5. Submit a pull request :D

License

MIT

© sugarshin

0.3.1

9 years ago

0.3.0

9 years ago

0.2.1

9 years ago

0.2.0

9 years ago

0.1.0

9 years ago

0.0.2

9 years ago

0.0.1

9 years ago