
Security News
The Next Open Source Security Race: Triage at Machine Speed
Claude Opus 4.6 has uncovered more than 500 open source vulnerabilities, raising new considerations for disclosure, triage, and patching at scale.
A tiny (255B) shim for when
Element.classListcannot be used~!
This module exposes three module definitions:
dist/classico.mjsdist/classico.jsdist/classico.min.js$ npm install --save classico
import { remove, toggle } from 'classico';
const $ = document.querySelector.bind(document);
const isOpen = 'menu__open';
$('.menu-nav').onclick = () => {
toggle(document.body, isOpen);
};
$('.menu-overlay').onclick = () => {
remove(document.body, isOpen);
};
Returns: RegExp
Converts the given String into a RegExp – used within classico.has and classico.replace.
Returns: Boolean
Checks if the Element's className contains the class value – akin to Element.classList.contains().
Returns: undefined
Add the class value(s) to the Element's className – akin to Element.classList.add().
Note: Classico will not append a className if the Element already contains it.
let elem = document.body;
// add one class
classico.add(elem, 'foo');
// add multiple classes
classico.add(elem, 'foo', 'bar', 'baz');
//=> Only 'bar' & 'baz' were added this time!
Returns: undefined
Remove the class value(s) to the Element's className – akin to Element.classList.remove().
let elem = document.body;
// remove one class
classico.remove(elem, 'foo');
// remove multiple classes
classico.remove(elem, 'bar', 'baz');
Returns: undefined
Replaces an existing class with a new class – akin to Element.classList.replace().
Important: If
newClassis not defined thenoldClasswill be removed entirely!
Returns: Boolean
Toggles the existence of a class for an Element – akin to Element.classList.toggle().
When force is not defined, the str value will be added if not already and removed if it existed.
If force is defined and truthy, the str value will be added.
If force is defined and falsey, the str value will be removed.
Returns true if the class was successfully added to the Element.
Returns false if the class was removed from the Element's className value.
MIT © Luke Edwards
FAQs
A tiny (242B) shim when Element.classList cannot be used~!
The npm package classico receives a total of 2 weekly downloads. As such, classico popularity was classified as not popular.
We found that classico demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

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.

Security News
Claude Opus 4.6 has uncovered more than 500 open source vulnerabilities, raising new considerations for disclosure, triage, and patching at scale.

Research
/Security News
Malicious dYdX client packages were published to npm and PyPI after a maintainer compromise, enabling wallet credential theft and remote code execution.

Security News
gem.coop is testing registry-level dependency cooldowns to limit exposure during the brief window when malicious gems are most likely to spread.