attr-range
find ranges for wiring up live automatically updating collections
example
var arange = ;var rangef =;var elems = document;for var i = 0; i < elemslength; i++;
methods
var arange = ;
var rangef = arange(start='data-start', end='data-end', function (range) {})
Register a callback to fire when range elements have been gathered.
range objects have:
range.start
- start key in the collection rangerange.end
- end key in the collection rangerange.range
- object with onlystart
andend
keys; useful for handing todb.createReadStream()
range.element
- container element for all the items in the range
rangef(elem)
Call the rangef()
function on each element elem
that has the start and end
keys to populate the callback with.
install
With npm do:
npm install attr-range
license
MIT