collapse
v1.0.1
Published
Collapses Selection and Range objects in a cross-browser way
Downloads
375
Readme
collapse
Collapse Selection and Range objects in a cross-browser way.
Usage
var collapse = require('collapse');
// ...
// second parameter is optional. true = toStart, false = toEnd, defaults to end
collapse(s, true);
// more readable forms
collapse.toEnd(s);
collapse.toStart(s);