index.js
function makeInterfaceValidator(interfacePropArrays) {
	var props = flatten(interfacePropArrays);

	return function(base) {
			var missingProps = props.reduce(function(missing, prop) {
				return prop in base ? missing : missing.concat(prop);
			}, []);

		return missingProps.length ? {message:"missing expected properties", related: missingProps} : undefined;
	};
}
function makeInterfaceValidator(interfacePropArrays) {
	var props = flatten(interfacePropArrays);

	return function(base) {
			var missingProps = props.reduce(function(missing, prop) {
				return prop in base ? missing : missing.concat(prop);
			}, []);

		return missingProps.length ? {message:"missing expected properties", related: missingProps} : undefined;
	};
}
function makeInterfaceValidator ( interfacePropArrays ) { var props = flatten ( interfacePropArrays ) ; return function ( base ) { var missingProps = props . reduce ( function ( missing , prop ) { return prop in base ? missing : missing . concat ( prop ) ; } , [ ] ) ; return missingProps . length ? { message : "missing expected properties" , related : missingProps } : undefined ; } ; }
return a function that validates it's argument has all the properties in the interfacePropArrays
return a function that validates it s argument has all the properties in the interfacePropArrays