index.js
function createValidatorFuncs(base, subjDef, subjDescription) {

	if (!subjDef.validatorDefs && (base !== standard.VALIDATOR_DEFS))
		return base;

	const validatorFuncs = Object.create(base);
	for (let validatorId in subjDef.validatorDefs) {
		const validatorFunc = subjDef.validatorDefs[validatorId];
		if ((typeof validatorFunc) !== 'function')
			throw new common.X2UsageError(
				'Validator definition "' + validatorId + '" on ' +
					subjDescription + ' is not a function.');
		validatorFuncs[validatorId] = validatorFunc;
	}

	return validatorFuncs;
}
function createValidatorFuncs(base, subjDef, subjDescription) {

	if (!subjDef.validatorDefs && (base !== standard.VALIDATOR_DEFS))
		return base;

	const validatorFuncs = Object.create(base);
	for (let validatorId in subjDef.validatorDefs) {
		const validatorFunc = subjDef.validatorDefs[validatorId];
		if ((typeof validatorFunc) !== 'function')
			throw new common.X2UsageError(
				'Validator definition "' + validatorId + '" on ' +
					subjDescription + ' is not a function.');
		validatorFuncs[validatorId] = validatorFunc;
	}

	return validatorFuncs;
}
function createValidatorFuncs ( base , subjDef , subjDescription ) { if ( ! subjDef . validatorDefs && ( base !== standard . VALIDATOR_DEFS ) ) return base ; const validatorFuncs = Object . create ( base ) ; for ( let validatorId in subjDef . validatorDefs ) { const validatorFunc = subjDef . validatorDefs [ validatorId ] ; if ( ( typeof validatorFunc ) !== 'function' ) throw new common . X2UsageError ( 'Validator definition "' + validatorId + '" on ' + subjDescription + ' is not a function.' ) ; validatorFuncs [ validatorId ] = validatorFunc ; } return validatorFuncs ; }
Create validator functions set for the specified container or property.

@private
@param {Object.<string,module:x2node-validators.validator>} base Base
validator functions set from the context.
@param {Object} subjDef Subject definition object possibly containing a
<code>validatorDefs</code> attribute.
@param {string} subjDescription Subject description for error messages.
@returns {Object.<string,module:x2node-validators.validator>} validator
functions set to use for the subject.
Create validator functions set for the specified container or property .