Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
A small utility for stripping unwanted classes from HTML strings ✂️
Working with genereated HTML can be a pain; you don't always have control of the output and when you need to use that markup somewhere else you often have to perform some clean up first. This library allows you to filter specific vendor generated classes (or IDs) to make working with HTML strings easier. Some possible use cases:
This library makes use of String.prototype.replaceAll() so support for ES2021 or higher is required.
See Caniuse
Install the package:
# Using npm
npm install classtrate
# Using Yarn
yarn add classtrate
Import and filter with a string or glob:
import { filter } from 'classtrate'; // require() also supported
const source = '<h1 class="br-fGy7jw my-class">My Heading</h1>'; // String of janky HTML
const pattern = 'br-*'; // or []
const output = filter(source, pattern); // <h1 class="my-class">My Heading</h1>
Supports these glob features:
FAQs
A small utility for stripping unwanted classes from HTML strings.
The npm package classtrate receives a total of 7 weekly downloads. As such, classtrate popularity was classified as not popular.
We found that classtrate 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
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.