
Company News
Jerod Santo Joins Socket as Head of Media
Allow myself to introduce... myself.
devkits-diff-checker
Advanced tools
Compare two texts and find differences using LCS algorithm. Side-by-side diff visualization. Zero-dependency text comparison tool.
Compare two texts and find differences using LCS (Longest Common Subsequence) algorithm. Side-by-side diff visualization. Zero-dependency text comparison tool.
Love these tools? Support development via Open Collective
Get access to 20+ premium tools including SQL to Code, Data Faker, JWT Generator, and more — all for $9 one-time.
💡 Pay with Crypto: BTC, ETH, USDT (TRC-20), SOL accepted. View crypto addresses
This package is part of DevKits — 82+ free developer tools. The online Diff Checker offers side-by-side visualization and merge conflict resolution.
npm install @devkits/diff-checker
const { compare, getStats, unified, summarize } = require('@devkits/diff-checker');
const original = `Hello World
This is a test
Goodbye`;
const modified = `Hello JavaScript
This is a test
Farewell`;
// Get detailed line-by-line diff
const diff = compare(original, modified);
// [
// { type: 'remove', left: 'Hello World', lNum: 1 },
// { type: 'add', right: 'Hello JavaScript', rNum: 1 },
// { type: 'equal', left: 'This is a test', right: 'This is a test', lNum: 2, rNum: 2 },
// { type: 'remove', left: 'Goodbye', lNum: 3 },
// { type: 'add', right: 'Farewell', rNum: 3 }
// ]
// Get statistics
const stats = getStats(diff);
// { added: 2, removed: 2, unchanged: 1 }
// Generate unified diff format
const uDiff = unified(original, modified);
// --- original
// +++ modified
// -Hello World
// +Hello JavaScript
// This is a test
// -Goodbye
// +Farewell
// Get simple summary
const summary = summarize(original, modified);
// {
// added: ['Hello JavaScript', 'Farewell'],
// removed: ['Hello World', 'Goodbye'],
// summary: '2 addition(s), 2 deletion(s)'
// }
// Ignore whitespace differences
const diffNoWs = compare('Hello World', 'Hello World', { ignoreWhitespace: true });
// Shows as equal
// Ignore case differences
const diffNoCase = compare('Hello', 'hello', { ignoreCase: true });
// Shows as equal
compare(left, right, options)Compares two texts line by line using LCS algorithm.
Options:
ignoreWhitespace: Ignore whitespace differences (default: false)ignoreCase: Ignore case differences (default: false)Returns array of diff items with type: 'equal', 'add', or 'remove'.
getStats(diff)Returns statistics: {added, removed, unchanged} counts.
unified(left, right, options)Generates unified diff format (like diff -u).
summarize(left, right, options)Returns simple summary with added/removed lines and count summary.
Uses the Longest Common Subsequence (LCS) algorithm to find the minimum set of changes needed to transform the original text into the modified text.
Time complexity: O(m × n) where m and n are the number of lines in each text.
Free Tools (82+):
| Tool | Description |
|---|---|
| base64-tool | Base64 encode/decode |
| chmod-calculator | Unix permissions converter |
| cron-parser | Cron expression parser |
| csv-json-converter | CSV ↔ JSON converter |
| docker-compose-parser | Docker Compose parser |
Unlock 20+ premium tools with a single payment:
💡 Pay with Crypto: BTC, ETH, USDT (TRC-20), SOL accepted
| Product | Description |
|---|---|
| Invoicely | Free invoice generator for freelancers |
| SnapOG | Free OG image generator (20+ templates) |
MIT
FAQs
Compare two texts and find differences using LCS algorithm. Side-by-side diff visualization. Zero-dependency text comparison tool.
The npm package devkits-diff-checker receives a total of 1 weekly downloads. As such, devkits-diff-checker popularity was classified as not popular.
We found that devkits-diff-checker demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.

Company News
Allow myself to introduce... myself.

Research
/Security News
A Twitch browser extension on Chrome and Firefox forwards users’ live OAuth session tokens through proxies controlled by a Russian bot service.

Security News
Anthropic found biased reasoning and recklessness drove Claude Mythos 5 to publish malware on PyPI and compromise a security vendor.