# sha1-file

> Get the SHA1 of a file.

Latest version **3.0.0** (published 2021-10-23) · MIT license · 0 weekly downloads

## Install

```sh
npm install sha1-file
pnpm add sha1-file
yarn add sha1-file
bun add sha1-file
```

## Health

**Score 30/100 (F)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 3.0.0 |
| Published | 2021-10-23 |
| First published | 2014-11-26 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM |
| Node | >=12.20 |
| Dependencies | 1 |
| Unpacked size | 2.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 5 |
| Author | Richie Bendall |
| Maintainers | roryrjb, richienb |
| Keywords | sha1, sha1sum, checksum, file, generator, path, create, compute, hash |

## Links

- npm: https://www.npmjs.com/package/sha1-file
- Repository: https://github.com/Richienb/sha1-file
- Homepage: https://github.com/Richienb/sha1-file#readme
- Issues: https://github.com/Richienb/sha1-file/issues
- npm.io page: https://npm.io/package/sha1-file

## Dependencies (1)

- [hasha](https://npm.io/package/hasha.md) ^5.2.2

## Alternatives

- [base64url](https://npm.io/package/base64url.md) — 6.1M weekly downloads
- [get-installed-path](https://npm.io/package/get-installed-path.md) — 502.9K weekly downloads
- [@uppy/url](https://npm.io/package/@uppy/url.md) — 185.8K weekly downloads
- [@d3fc/d3fc-shape](https://npm.io/package/@d3fc/d3fc-shape.md) — 16.2K weekly downloads
- [localizer](https://npm.io/package/localizer.md) — 226 weekly downloads

## Recent versions

- 3.0.0 (latest) — 2021-10-23
- 2.0.1 — 2021-10-23
- 2.0.0 — 2020-04-05
- 1.0.4 — 2018-10-14
- 1.0.3 — 2018-10-14
- 1.0.2 — 2018-10-14
- 1.0.1 — 2018-06-02
- 1.0.0 — 2015-06-21
- 0.0.5 — 2014-12-07
- 0.0.4 — 2014-12-06
- 0.0.3 — 2014-12-06
- 0.0.2 — 2014-11-26
- 0.0.1 — 2014-11-26

## 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.

---
_Source: https://npm.io/package/sha1-file · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
