Research
Recent Trends in Malicious Packages Targeting Discord
The Socket research team breaks down a sampling of malicious packages that download and execute files, among other suspicious behaviors, targeting the popular Discord platform.
diffable-html
Advanced tools
Readme
This formatter will normalize your HTML in a way that when you diff it, you get a clear sense of what changed.
This is a "zero-config" and opinionated HTML formatter. Default rules might change in future releases in which case we will push a major release.
Feel free to open issues to discuss better defaults.
Formatting consists of:
Be aware that this plugin is intended for making HTML diffs more readable. We took the compromise of not dealing with white-spaces like the browsers do.
Add the package as a dev-dependency:
# With npm
npm install --save-dev diffable-html
# With yarn
yarn add --dev diffable-html
import toDiffableHtml from 'diffable-html';
const html = `
<div id="header">
<h1>Hello World!</h1>
<ul id="main-list" class="list"><li><a href="#">My HTML</a></li></ul>
</div>
`
console.log(toDiffableHtml(html));
Will output:
<div id="header">
<h1>
Hello World!
</h1>
<ul
id="main-list"
class="list"
>
<li>
<a href="#">
My HTML
</a>
</li>
</ul>
</div>
This formatter was initially developed to address the lack of some features in js-beautifier:
These features are needed to improve readability of HTML diffs.
Development of this plugin was motivated by making testing of Vue.js components easier by the use of Jest with snapshot tests.
You can find a serializer for formatting your HTML here Jest serializer.
FAQs
Opinionated HTML formatter focused towards making HTML diffs readable.
We found that diffable-html demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 5 open source maintainers 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
The Socket research team breaks down a sampling of malicious packages that download and execute files, among other suspicious behaviors, targeting the popular Discord platform.
Security News
Socket CEO Feross Aboukhadijeh joins a16z partners to discuss how modern, sophisticated supply chain attacks require AI-driven defenses and explore the challenges and solutions in leveraging AI for threat detection early in the development life cycle.
Security News
NIST's new AI Risk Management Framework aims to enhance the security and reliability of generative AI systems and address the unique challenges of malicious AI exploits.