https://github.com/hyperlink/crc2json
NodeJS module/cli that scan a directory of files and generates a CRC32 for each file and outputs them in JSON format.
https://github.com/hyperlink/crc2json
Last synced: over 1 year ago
JSON representation
NodeJS module/cli that scan a directory of files and generates a CRC32 for each file and outputs them in JSON format.
- Host: GitHub
- URL: https://github.com/hyperlink/crc2json
- Owner: hyperlink
- License: mit
- Created: 2013-09-13T17:30:39.000Z (almost 13 years ago)
- Default Branch: master
- Last Pushed: 2017-01-10T21:20:16.000Z (over 9 years ago)
- Last Synced: 2025-01-24T07:31:07.276Z (over 1 year ago)
- Language: JavaScript
- Size: 3.91 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: MIT-LICENSE.txt
Awesome Lists containing this project
README
# crc2json #
Scan a directory of files and generates a CRC32 for each file and outputs them in JSON format.
## CLI install and usage ##
npm install -g crc2json
To scan the current directory and write to `list.json`
crc2json -o list.json
Get help for other flags
crc2json -h
## As a node module ##
npm install crc2json --save
Using callback function example:
```javascript
var crc2json = require('crc2json')
crc2json(process.cwd(), function(map){
console.log(map)
})
```
Using EventEmitter example:
```javascript
var EventEmitter = require('events').EventEmitter
var event = new EventEmitter
event.on('crc', function(filename, crc) {
...
})
event.on('complete', function(){ ... })
crc2json(process.cwd(), event)
```
## License MIT ##