Introducing Socket Firewall: Free, Proactive Protection for Your Software Supply Chain.Learn More
Socket
Book a DemoInstallSign in
Socket

expand-selection

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

expand-selection

Add matching text to the current DOM selection

latest
Source
npmnpm
Version
0.2.0
Version published
Maintainers
1
Created
Source

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

Keywords

dom

FAQs

Package last updated on 06 Jun 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts