New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

remove-class

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

remove-class

Remove a given class from elements.

latest
Source
npmnpm
Version
1.0.0
Version published
Weekly downloads
2
-60%
Maintainers
1
Weekly downloads
 
Created
Source

remove-class

Remove a given class from elements.

Install

$ npm install --save remove-class

Usage

var removeClass = require('remove-class');
var el = document.querySelector('div');
var els = document.querySelectorAll('span');

removeClass(el, 'foo');
removeClass(els, 'bar');

Browser API

removeClass(element, className)

element

Required
Type: HTML DOM element

Element(s) to remove class from.

className

Required
Type: string

Class name to be removed.

  • add-class - Add a given class to elements.
  • has-class - Check if an element has a given class.

License

MIT © Andreas Gillström

Keywords

browser

FAQs

Package last updated on 25 Aug 2015

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