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

diffr

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

diffr

CLI diff tool for files, text, and JSON with human readable output.

  • 1.1.0
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
1
decreased by-83.33%
Maintainers
1
Weekly downloads
 
Created
Source

Diffr

CLI diff tool for files, text, and JSON written in Node.js

Install

npm install diffr -g

Usage


  Usage: diffr [options] <file ...>

  Options:

    -h, --help           output usage information
    -V, --version        output the version number
    -t, --text [value]   Add text string to be diff'd
    -j, --json [string]  Add json string to be diff'd
    -f, --file <file>    Add file to be diff'd
    -c, --column         Columnized output

Examples

Text

$ diffr -t "hello\nworld" -t "hello\nnijiko"

JSON

$ diffr -j "{\"hello\":\"world\"}" -j "{\"hello\":\"nijiko\"}"

File

$ diffr diffr.js package.json

File Descriptors / Streams

$ diffr <(curl -Is https://httpbin.org/ip  2>&1) <(curl -Is https://httpbin.org  2>&1)

   HTTP/1.1 200 OK
   Server: nginx
   Date: Wed, 25 Mar 2015 07:10:56 GMT
 - Content-Type: text/html; charset=utf-8
 + Content-Type: application/json
 - Content-Length: 11729
 + Content-Length: 32
   Connection: keep-alive
   Access-Control-Allow-Origin: *
   Access-Control-Allow-Credentials: true

Columnized Output

ᐅ ./diffr.js -c <(curl -Is https://httpbin.org/ip  2>&1) <(curl -Is https://httpbin.org  2>&1)

   HTTP/1.1 200 OK                            HTTP/1.1 200 OK
   Server: nginx                              Server: nginx
   Date: Wed, 25 Mar 2015 18:29:37 GMT        Date: Wed, 25 Mar 2015 18:29:37 GMT
 - Content-Type: text/html; charset=utf-8   + Content-Type: application/json
 - Content-Length: 11729                    + Content-Length: 32
   Connection: keep-alive                     Connection: keep-alive
   Access-Control-Allow-Origin: *             Access-Control-Allow-Origin: *
   Access-Control-Allo

License

MIT

Keywords

FAQs

Package last updated on 25 Mar 2015

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