Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Native JS elements selector and helpers for classes, attributes or styles
Pure JavaScript elements selector and helpers for classes, attributes or styles. It's very small: about 700 bytes when uglified and Gziped! The plugin is commonJS and AMD compliant.
Why this plugin ?
You can easily add IE9 browser support with this shim for classList.
Demo Codepen
NPM NPM page
npm install uu-select
The __ function accept 2 parameters, a selector
and a context
(optional), that must be valid querySelectorAll selectors:
__(selector [, context]);
// example
__('.my-class img');
__('.my-class', '.wrapper-class');
__(selector [, context]).addClass(className [, className]);
__(selector [, context]).removeClass(className [, className]);
__(selector [, context]).toggleClass(className [, className]);
__(selector [, context]).hasClass(className);
// return true or false
__(selector [, context]).attr(attributeName);
// return its value
__(selector [, context]).attr(attributeName, value);
// or
__(selector [, context]).attr({
attributeName: value,
attributeName: value
});
__(selector [, context]).removeAttr(attributeName [, attributeName]);
__(selector [, context]).css(property);
// return its value
__(selector [, context]).css(property, value);
// or
__(selector [, context]).css({
property: value,
property: value
});
__(selector [, context]).on(event, listener [, capture]);
// Don't use an anonymous function is you plan to remove that event later
__(selector [, context]).of(event, listener);
FAQs
Native JS elements selector and helpers for classes, attributes or styles
The npm package uu-select receives a total of 2 weekly downloads. As such, uu-select popularity was classified as not popular.
We found that uu-select 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.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.