lib/normalize.js
function async(schema, values, optionalOptions, callbackFn) {
	var options, callback;

	options = optionalOptions || {};
	callback = callbackFn || optionalOptions;
	process.nextTick(_async);

	function _async() {
		deref(schema, options, function (err, derefSchema) {
			var result;

			if (err) {
				callback(err);
			} else {
				result = normalize(derefSchema, values, options);
				callback(null, result);
			}
		});
	}
}
function async(schema, values, optionalOptions, callbackFn) {
	var options, callback;

	options = optionalOptions || {};
	callback = callbackFn || optionalOptions;
	process.nextTick(_async);

	function _async() {
		deref(schema, options, function (err, derefSchema) {
			var result;

			if (err) {
				callback(err);
			} else {
				result = normalize(derefSchema, values, options);
				callback(null, result);
			}
		});
	}
}
function async ( schema , values , optionalOptions , callbackFn ) { var options , callback ; options = optionalOptions || { } ; callback = callbackFn || optionalOptions ; process . nextTick ( _async ) ; function _async ( ) { deref ( schema , options , function ( err , derefSchema ) { var result ; if ( err ) { callback ( err ) ; } else { result = normalize ( derefSchema , values , options ) ; callback ( null , result ) ; } } ) ; } }
Normalizes a loose json data object to a strict json-schema data object.

@context Don't care.
@param schema The schema used to normalize the given JSON data object.
@param data The JSON data object.
@param options Optional. Currently only accepts loader or array of loaders.
@param options.loader | options.loaders A loader or an array of loaders
that help loading remote schemas. Loaders are tested in the order listed.
@param callback The callback function with `function(err, detail)` signature
that the normalizer delivers the normalized JSON object to. Called with null context.
@return No return value.
Normalizes a loose json data object to a strict json - schema data object .