Skip to content

Commit

Permalink
docs: update README and package description
Browse files Browse the repository at this point in the history
  • Loading branch information
bconnorwhite committed Oct 4, 2020
1 parent 3af192a commit 70d5833
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 5 deletions.
11 changes: 8 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<div align="center">
<h1>dir-exists-safe</h1>
<a href="https://github.com/bconnorwhite/dir-exists-safe">
<img alt="dir-exists-safe" src="assets/header.svg" />
</a>
<a href="https://npmjs.com/package/dir-exists-safe">
<img alt="NPM" src="https://img.shields.io/npm/v/dir-exists-safe.svg">
</a>
Expand All @@ -19,11 +21,11 @@

<br />

> Check if a directory exists without a try catch.
> Check if a directory exists without try catch.
- Returns `true` if the path exists and is a directory.
- Returns `false` if the path is not a directory, or does not exist.
- Returns `undefined` for other errors (for example, permission denied) rather than throwing.
- Returns `undefined` on other errors (for example, permission denied) rather than throwing.

## Installation

Expand Down Expand Up @@ -60,6 +62,9 @@ function dirExistsSync(path: string): boolean | undefined;

[MIT](https://opensource.org/licenses/MIT)

<br />

## Related Packages

- [fs-safe](https://www.npmjs.com/package/fs-safe): A simple fs wrapper that doesn't throw
- [file-exists-safe](https://www.npmjs.com/package/file-exists-safe): Check if a file exists without a try catch
28 changes: 28 additions & 0 deletions assets/header.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "dir-exists-safe",
"version": "1.0.0",
"description": "Check if a directory exists without a try catch",
"description": "Check if a directory exists without try catch",
"license": "MIT",
"author": {
"name": "Connor White",
Expand Down Expand Up @@ -42,4 +42,4 @@
"npmpackagejsonlint": {
"extends": "npm-package-json-lint-config-bob"
}
}
}

0 comments on commit 70d5833

Please sign in to comment.