# assert-file-exists

> Assert that a file exists

Latest version **1.0.0** (published 2016-07-18) · MIT license · 0 weekly downloads

## Install

```sh
npm install assert-file-exists
pnpm add assert-file-exists
yarn add assert-file-exists
bun add assert-file-exists
```

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2016-07-18 |
| First published | 2016-07-18 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | John Otander |
| Maintainers | johno |
| Keywords | file, assert, exist |

## Links

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

## Dependencies (1)

- [file-exists](https://npm.io/package/file-exists.md) ^1.0.0

## Alternatives

- [unionfs](https://npm.io/package/unionfs.md) — 2.2M weekly downloads
- [path-starts-with](https://npm.io/package/path-starts-with.md) — 35.9K weekly downloads
- [redzip](https://npm.io/package/redzip.md) — 1.2K weekly downloads
- [vscode-anymatch](https://npm.io/package/vscode-anymatch.md) — 848 weekly downloads
- [@ledgerhq/coin-filecoin](https://npm.io/package/@ledgerhq/coin-filecoin.md) — 793 weekly downloads

## Recent versions

- 1.0.0 (latest) — 2016-07-18

## README

# assert-file-exists [![Build Status](https://secure.travis-ci.org/johnotander/assert-file-exists.svg?branch=master)](https://travis-ci.org/johnotander/assert-file-exists) [![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat)](https://github.com/feross/standard)

Assert that a file exists

## Installation

```bash
npm install --save assert-file-exists
```

## Usage

```javascript
var assertFileExists = require('assert-file-exists')

assertFileExists('readme.md', 'there is a readme')
assertFileExists('foo', 'there is a foo file') // => AssertionError: there is a foo file
assertFileExists('foo', { skipError: true }) // => false
```

## License

MIT

## Contributing

1. Fork it
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create new Pull Request

Crafted with <3 by John Otander ([@4lpine](https://twitter.com/4lpine)).

***

> This package was initially generated with [yeoman](http://yeoman.io) and the [p generator](https://github.com/johnotander/generator-p.git).

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