0.1.0 • Published 5 years ago

@ryanmorr/is-selector-supported v0.1.0

Weekly downloads
1
License
Unlicense
Repository
github
Last release
5 years ago

isSelectorSupported

Version Badge Build Status License

Feature test CSS selector support

Install

Download the development or minified version, or install via NPM:

npm install @ryanmorr/is-selector-supported

Usage

To use the method, simply provide a string of the CSS selector:

import isSelectorSupported from '@ryanmorr/is-selector-supported';

// Check if the :has() selector is supported
isSelectorSupported(':has(img)');

// Check if the case-insensitive attribute selectors are supported
isSelectorSupported('[foo=bar i]');

// Check if the ::backdrop pseudo-element selector is supported
isSelectorSupported('::backdrop');

License

This project is dedicated to the public domain as described by the Unlicense.