An open API service indexing awesome lists of open source software.

https://github.com/glebmachine/event-filter

Filter handling by specified function
https://github.com/glebmachine/event-filter

Last synced: about 1 month ago
JSON representation

Filter handling by specified function

Awesome Lists containing this project

README

        

# event-filter.js
Filter handling by specified function

# Example
```javascript
// create filter
var handlerFn = createFilter(renderFn, filterFn);

// perform Some repaints or/and calculations
function renderFn(value) {
// value - results of filterFn
}

// if returned value not equal previous value, renderFn will called
function filterFn() {
return document.body.clientWidth > 1024;
}

// assign listener to event
window.onresize = handlerFn;
```