0.3.1 • Published 5 years ago

custom-filters-js v0.3.1

Weekly downloads
2
License
MIT
Repository
gitlab
Last release
5 years ago

CustomFilters

This class take inspiration of CustomEvent class.

Installation

npm i custom-filters-js

Methods

constructor( target )

If you want to can add a target, when you call to addFilterListener the target will returned as this.

dispatchFilter

Trigger a previously registered filter.

You can send all the parameters you need, the first parameter will always be the name of the filter.

.dispatchFilter('filterName', p1, p2, p3, ...);

addFilterListener

Register a filter.

.addFilterListener('filterName', function(p1, p2, p3){
	console.log(p1, p2, p3);
});

When the dispatchFilter function is called, addFilterListener will be called using its corresponding filter.

0.3.1

5 years ago

0.3.0

5 years ago

0.2.1

5 years ago

0.2.0

5 years ago

0.1.0

5 years ago