README
Welcome to diff-dir-file 👋
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
- Github: @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