
Security News
Axios Supply Chain Attack Reaches OpenAI macOS Signing Pipeline, Forces Certificate Rotation
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.
textdiff-patch
Advanced tools

This is a simple module for applying lean text diff delta patches created by textdiff-create.
See below.
Assuming you've correctly installed the npm module with npm i textdiff-patch [--save|--save-dev]:
const applyPatch = require('textdiff-patch');
const v1 = 'The sleepy brown fox';
const delta = [
[0, 4],
[-1, 6],
[1, 'quick'],
[0, 10],
[1, ' jumps over the lazy dog']
];
const v2 = applyPatch(v1, delta);
console.log(v2);
The script will produce the following output:
The quick brown fox jumps over the lazy dog
Have a look at textdiff-create for more info.
If you find this piece of software useful, please star the repo, spread the word and feel free to endorse me on LinkedIn:
On 24th of February 2022 Russia unlawfully invaded Ukraine. This is an unjustified, unprovoked attack on the sovereignty of a neighboring country, but also an open affront to international peace and stability that has the potential to degenerate into a nuclear event threatening the very existence of humanity. I am a Romanian (EU) citizen, but I stand with Ukraine and I am doing everything in my power to stop this madness. Here's how you can show your support.
Released under ISC.
FAQs
Apply lean text diff delta patches created by textdiff-create.
The npm package textdiff-patch receives a total of 165 weekly downloads. As such, textdiff-patch popularity was classified as not popular.
We found that textdiff-patch 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
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.

Security News
Open source is under attack because of how much value it creates. It has been the foundation of every major software innovation for the last three decades. This is not the time to walk away from it.

Security News
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.