range-limit

1.0.4 • Public • Published

Range Limit

Build Status Coverage Status npm

This module exposes a single function, limit(range, bounds), that limits the Range to the contents of bounds, a Node.

Example

var limit = require('range-limit');
var article = document.getElementsByTagName('article');
var range = window.getSelection().getRangeAt(0);
limit(range, article);

/range-limit/

    Package Sidebar

    Install

    npm i range-limit

    Weekly Downloads

    0

    Version

    1.0.4

    License

    MIT

    Last publish

    Collaborators

    • tilgovi