https://github.com/mattriley/node-duplicate-file-finder
Finds duplicate files across given directories without hashing.
https://github.com/mattriley/node-duplicate-file-finder
dedupe duplicate-files hashless javascript nodejs npm-package
Last synced: 5 months ago
JSON representation
Finds duplicate files across given directories without hashing.
- Host: GitHub
- URL: https://github.com/mattriley/node-duplicate-file-finder
- Owner: mattriley
- Created: 2020-11-24T05:45:56.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2024-04-11T12:59:48.000Z (about 1 year ago)
- Last Synced: 2024-12-19T02:19:36.212Z (6 months ago)
- Topics: dedupe, duplicate-files, hashless, javascript, nodejs, npm-package
- Language: JavaScript
- Homepage:
- Size: 2.37 MB
- Stars: 2
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README-TEMPLATE.md
Awesome Lists containing this project
README
<%- lib.renderOpening() %>
## Install
<%- await lib.renderCode('npm install duplicate-file-finder', '', 'https://www.npmjs.com/package/duplicate-file-finder'); %>
## Usage
```js
const { findDuplicates } = require('duplicate-file-finder');
const sourcePath = 'photos'; // defaults to current directory.
const searchPaths = ['more-photos', 'even-more-photos']; // defaults to empty.
const duplicates = findDuplicates({ sourcePath, searchPaths }).then(duplicates => {
// do something with duplicates.
});
````duplicates` is a data structure like:
```js
[
[
'photos/family.jpg',
'more-photos/copy-of-family.jpg',
'even-more-photos/another-copy-of-family.jpg'
],
[
'photos/pets.jpg',
'more-photos/copy-of-pets.jpg'
]
]
```## Architecture
<%- await lib.renderModuleDiagram() %>