expand-selection

0.2.0 • Public • Published

npm

expand-selection

Dependency Status

Add matching text to the current DOM selection.

API

expandSelection(string, [opts])

expandSelection([selection], [opts])

Searches document for string or selection.toString() and selects matching ranges.

selection defaults to window.getSelection().

Returns Selection object.

opts.clear

Clears current selection before updating. Defaults to false.

opts.ignoreCase

Whether to ignore case while attempting a match in a string. Defaults to false.

Install

npm install expand-selection

License

MIT

Package Sidebar

Install

npm i expand-selection

Weekly Downloads

0

Version

0.2.0

License

MIT

Last publish

Collaborators

  • eush77