New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

git-diff-glob

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

git-diff-glob

An easy way to get a diff using a file glob.

  • 0.3.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2
Maintainers
1
Weekly downloads
 
Created
Source

git-diff-glob

An easy way to get a diff using a file glob.

Usage

Require and call the function providing a file "glob", a substring of a file that you want the diff of. git-diff-glob will look for all files that include the given substring, and return a string of the diff for all matching files.

By default, matches will be made case-insensitively. This can be overwritten by providing an options argument { caseSensitive: true }

const gitDiffGlob = require('git-diff-glob')

let diff

// provide a string for a diff of all files matching 'READ'
// (e.g. README.md)
diff = gitDiffGlob('READ', { caseSensitive: true })

// or provide a space--deliminated string of multiple substrings
diff = gitDiffGlob('index html')

// or provide an array of substrings
diff = gitDiffGlob(['index', 'html'])

console.log(diff)

Keywords

FAQs

Package last updated on 02 Feb 2017

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc