Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nknapp/detect-rename
Detect file renames based on the file contents
https://github.com/nknapp/detect-rename
Last synced: 20 days ago
JSON representation
Detect file renames based on the file contents
- Host: GitHub
- URL: https://github.com/nknapp/detect-rename
- Owner: nknapp
- Created: 2014-12-21T10:33:56.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2017-01-18T22:43:11.000Z (almost 8 years ago)
- Last Synced: 2024-10-06T03:41:12.410Z (about 1 month ago)
- Language: JavaScript
- Size: 5.86 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Introduction
------------The goal of this package is, to detect file renames based on the file contents, similar to the way `git` does it.
Files and contents are provided as javascript object, so this module should not need to access file system and
may even work in a browser.Example
-------```js
var detect = require("detect-rename.js");console.log(detect({
"abc": "Lorem ipsum sit desc",
"cde": "Lorem ipsum sit incro",
"qwertz": "poiu",
"cdeg": "Lorem ipsum sit incroa"
},{
"abcd": "Lorem ipsum sit desca",
"cdef": "Lorem ipsum sit incro",
"qwertz": "poiu"
}));
```Output:
```js
{
cdef: { from: 'cde', sim: 1 },
abcd: { from: 'abc', sim: 0.9629629629629629 }
}
```*See the jsdoc comment for options*
Changes
--------####0.0.1
* Initial checkin####0.1.0
* Changed the output to use the target file as object key. This is more useful, because this is what the target file is like in the
currently.*Please note that this api is still experimental until version 1.0. Feedback is welcome, although I cannot guarantee any response times at the moment.*