
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
selector-to-hash
Advanced tools
The selector-to-hash is easy to hash HTML and CSS selectors.
⚠ This is incomplete and we recommend that you do not use it.
This converts the class to hash and allows for a scoped CSS with no duplicates.
Currently, only the class selector is supported.
| before |
|---|
<div class="test">
<p class="text-center">selectorToHash</p>
</div>
.test {
width: 300px;
background: #ccc;
}
.text-center {
text-align: center;
}
| after |
|---|
<div class="h-aaaa1111">
<p class="h-bbbb2222">selectorToHash</p>
</div>
.h-aaaa1111 {
width: 300px;
background: #ccc;
}
.h-bbbb2222 {
text-align: center;
}
$ yarn add selector-to-hash # or npm install selector-to-hash
import { selectorToHash } from 'selector-to-hash'
const html =
`
<div class="test">selectorToHash</div>
`
const css =
`
.test {
color: blue;
}
`
selectorToHash(html, css)
/*
{
html:
`
<div class="h-aaaa1111">selectorToHash</div>
`,
css:
`
.h-aaaa1111 {
color: blue;
}
`
}
*/
const selectorToHash = require("selector-to-hash").selectorToHash;
selectorToHash(html, css)
/*
{
html: '',
css: '',
}
*/
FAQs
The selector-to-hash is easy to hash HTML and CSS selectors.
We found that selector-to-hash 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
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.