dom-reduce
Small library for dealing with browser DOM events in a reducible style. This lets operate on user events as with regular collection data structures in composable manner.
Usage
var open = var map = var filter = var fold = var takeWhile = // Take stream of mouse move events.var moves = // Map it to the axis positionsvar axis = // Filter down to the area we're interested in.var lineAxis = // Take positions only until mouse reaches the edge.// Note that when this contidion is met event listeners// will automatically be removed.var values = // Drow sowething in the given range.
Install
npm install dom-reduce
Develop
Library is developed using awesome browserify! Phantomify is used for running test in a PhantomJS.