JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 28278
  • Score
    100M100P100Q152404F
  • License MIT

hast utility to check if an element is a css style

Package Exports

  • hast-util-is-css-style

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (hast-util-is-css-style) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

hast-util-is-css-style

Build Coverage Downloads Size Sponsors Backers Chat

Check if an element is a CSS <style> element.

Install

This package is ESM only: Node 12+ is needed to use it and it must be importeded instead of requiredd.

npm:

npm install hast-util-is-css-style

This package exports the following identifiers: isCssStyle. There is no default export.

Use

import {h} from 'hastscript'
import {isCssStyle} from 'hast-util-is-css-style'

isCssStyle(h('style')) //=> true
isCssStyle(h('style', {type: ' TEXT/CSS '})) //=> true
isCssStyle(h('style', {type: 'text/foo'})) //=> false

API

isCssStyle(node)

Return true if node is a <style> element that has no type, an empty type, or 'text/css' as its type.

Contribute

See contributing.md in rehypejs/.github for ways to get started. See support.md for ways to get help.

This project has a code of conduct. By interacting with this repository, organization, or community you agree to abide by its terms.

License

MIT © Titus Wormer