lib/validators.js
function declaration(obj) {
	const
		{error, value} = joi.validate(obj, declarationSchema);

	if (error) {
		throw new TypeError(`Invalid declaration object: ${error.message}`);
	}

	return value;
}
function declaration(obj) {
	const
		{error, value} = joi.validate(obj, declarationSchema);

	if (error) {
		throw new TypeError(`Invalid declaration object: ${error.message}`);
	}

	return value;
}
function declaration ( obj ) { const { error , value } = joi . validate ( obj , declarationSchema ) ; if ( error ) { throw new TypeError ( ` ${ error . message } ` ) ; } return value ; }
Validates the specified package declaration

@template {T}
@param {T} obj
@returns {T}
Validates the specified package declaration