Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/targendaz2/proveit
Adds additional assertions and type checkers to Node.js projects.
https://github.com/targendaz2/proveit
assert assertions type type-check
Last synced: about 2 months ago
JSON representation
Adds additional assertions and type checkers to Node.js projects.
- Host: GitHub
- URL: https://github.com/targendaz2/proveit
- Owner: targendaz2
- License: mit
- Created: 2024-07-06T01:59:42.000Z (6 months ago)
- Default Branch: main
- Last Pushed: 2024-07-06T02:28:19.000Z (6 months ago)
- Last Synced: 2024-10-12T23:05:45.357Z (3 months ago)
- Topics: assert, assertions, type, type-check
- Language: TypeScript
- Homepage:
- Size: 66.4 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# proveit
![GitHub License](https://img.shields.io/github/license/targendaz2/proveit)
![GitHub Release](https://img.shields.io/github/v/release/targendaz2/proveit?label=version)
![NPM Version](https://img.shields.io/npm/v/proveit?logo=npm&logoColor=%23999999)
![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/targendaz2/proveit/test.yml?logo=github&label=tests&logoColor=%23999999)This package adds additional assertions and type checkers to Node.js projects.
## Installation
This package is available on npm as [`proveit`](https://npmjs.com/package/proveit).
```bash
npm install proveit
```## Usage
### Assertions
- `.assertIsPathLike(value)` - Asserts that the given value is [PathLike](https://github.com/DefinitelyTyped/DefinitelyTyped/blob/e601f0823d6d26007758ebbf8d427d3781bad840/types/node/fs.d.ts#L30).
- `.assertPathExists(path)` - Asserts that the given path exists.
- `.assertPathIsDirectory(path)` - Asserts that the given path is a directory.
- `.assertPathIsFile(path)` - Asserts that a given path is a file.
- `.assertPathIsExecutable(path)` - Asserts that the given path is an executable file.### Type Checks
- `.isPathLike(value)` - Checks if the given value is [PathLike](https://github.com/DefinitelyTyped/DefinitelyTyped/blob/e601f0823d6d26007758ebbf8d427d3781bad840/types/node/fs.d.ts#L30).
- `.isUnixFileMode(value)` - Checks if the given value could be a valid Unix file mode.## Contributing
Pull requests are welcome. For major changes, please open an issue first
to discuss what you would like to change.Please make sure to update tests as appropriate.
## License
This package is licensed under the [MIT License](https://github.com/targendaz2/proveit/blob/main/LICENSE).