selector-has

A helper utility to check the presence of a class in a CSS selector

Usage no npm install needed!

<script type="module">
  import selectorHas from 'https://cdn.skypack.dev/selector-has';
</script>

README

selector-has

build status coverage status coverage status

A helper utility to check the presence of a class in a CSS selector

usage

var has = require('selector-has');

has('.foo > .bar', 'foo');
// => true

has('.foobar', 'foo');
// => false