Skip to content

Adds additional assertions and type checkers to Node.js projects.

License

Notifications You must be signed in to change notification settings

targendaz2/proveit

Repository files navigation

proveit

GitHub License GitHub Release NPM Version GitHub Actions Workflow Status

This package adds additional assertions and type checkers to Node.js projects.

Installation

This package is available on npm as proveit.

npm install proveit

Usage

Assertions

  • .assertIsPathLike(value) - Asserts that the given value is PathLike.
  • .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.
  • .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.