@f/can-select-text

Check if an element can contain selectable text

Stats

StarsIssuesVersionUpdatedCreatedSize
@f/can-select-text
001.0.06 years ago6 years agoMinified + gzip package size for @f/can-select-text in KB

Readme

can-select-text

Build status Git tag NPM version Code style

Check if an element can contain selectable text

Installation

$ npm install @f/can-select-text

Usage

var canSelectText = require('@f/can-select-text')

canSelectText(textInput) === true
canSelectText(checkboxInput) === false

API

canSelectText(node)

  • node - A DOM element to check for text selectability

Returns: A boolean value indicating whether or not text can be selected in this input

License

MIT

If you find any bugs or have a feature request, please open an issue on github!

The npm package download data comes from npm's download counts api and package details come from npms.io.