
Security News
Browserslist-rs Gets Major Refactor, Cutting Binary Size by Over 1MB
Browserslist-rs now uses static data to reduce binary size by over 1MB, improving memory use and performance for Rust-based frontend tools.
Returns the git diff of two strings
npm install --save git-diff
git-diff takes 3 arguments, the first string to diff, the second string to diff and optionally a color flag (boolean)
git-diff returns a string containing the difference
The color flag (defaults to false) indicates whether you want the return value to be colorized with chalk
Examples to demonstrate usage follow.
With color:
var gitDiff = require('git-diff')
var actual = gitDiff('a\nb\n', 'a\nc\n', true)
expect(actual).to.equal('a\n-b\n+c\n')
Without color:
var gitDiff = require('git-diff')
var actual = gitDiff('a\nb\n', 'a\nc\n')
expect(actual).to.equal('a\n-b\n+c\n')
What's the difference between how God treats the righteous and the wicked?
And God saw that the light was good. And God separated the light from the darkness. Genesis 1:4 ESV
And he will do it again:
Let both grow together until the harvest, and at harvest time I will tell the reapers, “Gather the weeds first and bind them in bundles to be burned, but gather the wheat into my barn.” Matthew 13:30 ESV
Much love :D
FAQs
Returns the git diff of two strings
The npm package git-diff receives a total of 163,094 weekly downloads. As such, git-diff popularity was classified as popular.
We found that git-diff 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
Browserslist-rs now uses static data to reduce binary size by over 1MB, improving memory use and performance for Rust-based frontend tools.
Research
Security News
Eight new malicious Firefox extensions impersonate games, steal OAuth tokens, hijack sessions, and exploit browser permissions to spy on users.
Security News
The official Go SDK for the Model Context Protocol is in development, with a stable, production-ready release expected by August 2025.