Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

checkcss

Package Overview
Dependencies
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

checkcss

Utility method for warning when elements have a `class` attribute that refers to an undefined CSS class

  • 1.0.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
232
increased by5.94%
Maintainers
1
Weekly downloads
 
Created
Source

checkcss

Utility method for warning any time the class attribute of an element references undefined / non-existent CSS class.

In addition to doing a sweep of the DOM at the time cssCheck() is called, this sets up a MutationObserver to continuously monitor DOM changes, so is well-suited for dynamic webapps.

(Note: The monitoring logic is pretty efficient but is probably not something you want to be running in production.)

Installation

npm i csscheck

Usage

import checkCSS, { cssMonitor } from 'checkcss';

// Check current DOM
checkCSS();

// ... and setup monitor to check DOM as it changes
monitorCSS();

Keywords

FAQs

Package last updated on 16 May 2021

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc