0.3.0 • Published 1 year ago

@valtech-commerce/joi v0.3.0

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

@valtech-commerce/joi

npm npm dependencies npms Travis CI

joi extensions + extra goodies

Install

$ npm install @valtech-commerce/joi

Usage

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.

Documentation

View documentation

License

MIT © Valtech Canada inc.

0.3.0

1 year ago