Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

diff-ini

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

diff-ini

Load two INI files and return their differences

  • 0.0.4
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
Source

diff-ini

Compare two INI files for differences. This is both a library and a command-line tool.

npm version build status dependencies devDependencies

Command-Line

Install
npm install -g diff-ini
Usage
diff-ini path/to/old.ini path/to/new.ini

When a key changes:

-key = bad
+key = bar

When a key changes inside of a section:

-section/key = old
+section/key = new

When a section is erased:

-section/one/key = value

When a section is added:

+section/two/key = value

Library

Install as a Library
npm install diff-ini
Usage
var diff = require('diff-ini');

diff(process.argv[2], process.argv[3], function(error, result) {
    if (error) {
        console.error('File not found: "%s"', error.path);
    } else {
        diff.print(result);
    }
});
API
diff(strOldFile, strNewFile, fnDone)

Calculate the differences between strOldFile and strNewFile. Call fnDone(error, resultArray) when done, or an error occurs.

diff.print(result, [log])

Print the differences in a somewhat useful way. Output is sent to process.stdout or log(str) if you define one.

TODO

Probably tons! It's working the way I need it to right now, so let me know if you need something.

Credits

License

MIT License

Keywords

FAQs

Package last updated on 11 Nov 2014

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