0.1.2 • Published 6 years ago

diff-dir-file v0.1.2

Weekly downloads
3
License
MIT
Repository
github
Last release
6 years ago

directory compare and show the difference of files

šŸ  Homepage

Install

npm install diff-dir-file

Usage

const diff = require('diff-dir-file')
diff(path1, path2).then(res => {
  // do something
  // ....
})

Return

dirDiff returns Promise. Fulfilled value -Object in following format:

// the filename of the diff
interface IOut {
  name: IInner 
}
// the lineCount of the file
interface IInner{
  index: String[] // length: 2 , File A and File B
}

// For example

//a/a.js
function a() {
  console.log(1)
}
// b/a.js
function b() {
  console.log(2)
}

// result
{
  'a.js': {
    '1': ['function a() {' , 'function b() {'],
    '2': ['console.log(1)', 'console.log(2)'],
  }
}

Author

šŸ‘¤ sillyy

šŸ¤ Contributing

Contributions, issues and feature requests are welcome!Feel free to check issues page.

Show your support

Give a ā­ļø if this project helped you!

šŸ“ License

Copyright Ā© 2019 sillyy. This project is MIT licensed.


This README was generated with ā¤ļø by readme-md-generator

0.1.2

6 years ago

0.1.1

6 years ago

0.1.0

6 years ago