
Security News
/Research
Wallet-Draining npm Package Impersonates Nodemailer to Hijack Crypto Transactions
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
assert-equal-html
Advanced tools
Assert the equality of two HTML fragments
npm add assert-equal-html
const { assertEqual } = require('assert-equal-html')
assertEqual(
'<button type="button" class="btn btn-link">Link</button>',
'<button class="btn-link btn" type="button">Link</button>')
The comparison rules are as follows:
ASCII whitespace is U+0009 TAB, U+000A LF, U+000C FF, U+000D CR, or U+0020 SPACE.
To strip and collapse ASCII whitespace in a string, replace any sequence of one or more consecutive code points that are ASCII whitespace in the string with a single U+0020 SPACE code point, and then remove any leading and trailing ASCII whitespace from that string.
assertEqual(actual, expected[, message])
Tests HTML equality between the actual
and expected
parameters.
assertNotEqual(actual, expected[, message])
Tests HTML inequality between the actual
and expected
parameters.
MIT
FAQs
Assert the equality of two HTML fragments
We found that assert-equal-html 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
/Research
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
Security News
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.
Security News
/Research
Malicious Nx npm versions stole secrets and wallet info using AI CLI tools; Socket’s AI scanner detected the supply chain attack and flagged the malware.