https://github.com/richienb/sha1-file
Get the SHA1 of a file.
https://github.com/richienb/sha1-file
Last synced: 9 months ago
JSON representation
Get the SHA1 of a file.
- Host: GitHub
- URL: https://github.com/richienb/sha1-file
- Owner: Richienb
- License: mit
- Created: 2020-04-05T10:43:30.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2021-10-23T03:31:32.000Z (about 4 years ago)
- Last Synced: 2025-04-13T14:47:34.014Z (9 months ago)
- Language: JavaScript
- Size: 21.5 KB
- Stars: 5
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: license
Awesome Lists containing this project
README
# sha1-file
Get the SHA1 of a file.
## Install
```sh
npm install sha1-file
```
## Usage
```js
import {sha1File} from 'sha1-file';
console.log(await sha1File('file.txt'));
//=> 'a0b65939670bc2c010f4d5d6a0b3e4e4590fb92b'
```
## API
### sha1File(filepath)
Returns a promise for the file hash.
### sha1FileSync(filepath)
Returns the file hash.