https://github.com/valtech-commerce/joi
joi extensions + extra goodies
https://github.com/valtech-commerce/joi
joi joi-extensions npm-package
Last synced: about 1 month ago
JSON representation
joi extensions + extra goodies
- Host: GitHub
- URL: https://github.com/valtech-commerce/joi
- Owner: valtech-commerce
- License: mit
- Created: 2023-02-07T14:46:59.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-02-07T15:09:39.000Z (over 3 years ago)
- Last Synced: 2025-09-17T07:38:05.931Z (9 months ago)
- Topics: joi, joi-extensions, npm-package
- Language: JavaScript
- Homepage: https://valtech-commerce.github.io/joi
- Size: 144 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
- Security: SECURITY.md
Awesome Lists containing this project
README
# @valtech-commerce/joi
[](https://www.npmjs.com/package/@valtech-commerce/joi)
[](https://david-dm.org/valtech-commerce/joi)
[](https://npms.io/search?q=%40valtech-commerce%2Fjoi)
[](https://travis-ci.com/valtech-commerce/joi/builds)
> joi extensions + extra goodies
## Install
```bash
$ npm install @valtech-commerce/joi
```
## Usage
```js
import { Joi, validateArgument } from '@valtech-commerce/joi';
class MyClass () {
constructor(path, value) {
validateArgument('path', path, Joi.absolutePath().required());
validateArgument('value', value, Joi.number().required());
// Do your stuff
}
}
```
## Extensions
### absolutePath
Validate that the value is an absolute *nix or Windows path.
### joiSchema
Validate that the value is a joi schema.
### kebabCase
Validate that the value is kebab-case.
### variableName
Validate that the value is a JavaScript valid variable name via [is-var-name](https://github.com/shinnn/is-var-name).
## Documentation
View [documentation](https://valtech-commerce.github.io/joi)
## License
MIT © [Valtech Canada inc.](https://www.valtech.ca/)