src/EventStore.js
function validateEventStorage(storage) {
	if (!storage) throw new TypeError('storage argument required');
	if (typeof storage !== 'object') throw new TypeError('storage argument must be an Object');
	if (typeof storage.commitEvents !== 'function') throw new TypeError('storage.commitEvents must be a Function');
	if (typeof storage.getEvents !== 'function') throw new TypeError('storage.getEvents must be a Function');
	if (typeof storage.getAggregateEvents !== 'function') throw new TypeError('storage.getAggregateEvents must be a Function');
	if (typeof storage.getSagaEvents !== 'function') throw new TypeError('storage.getSagaEvents must be a Function');
	if (typeof storage.getNewId !== 'function') throw new TypeError('storage.getNewId must be a Function');
}
function validateEventStorage(storage) {
	if (!storage) throw new TypeError('storage argument required');
	if (typeof storage !== 'object') throw new TypeError('storage argument must be an Object');
	if (typeof storage.commitEvents !== 'function') throw new TypeError('storage.commitEvents must be a Function');
	if (typeof storage.getEvents !== 'function') throw new TypeError('storage.getEvents must be a Function');
	if (typeof storage.getAggregateEvents !== 'function') throw new TypeError('storage.getAggregateEvents must be a Function');
	if (typeof storage.getSagaEvents !== 'function') throw new TypeError('storage.getSagaEvents must be a Function');
	if (typeof storage.getNewId !== 'function') throw new TypeError('storage.getNewId must be a Function');
}
function validateEventStorage ( storage ) { if ( ! storage ) throw new TypeError ( 'storage argument required' ) ; if ( typeof storage !== 'object' ) throw new TypeError ( 'storage argument must be an Object' ) ; if ( typeof storage . commitEvents !== 'function' ) throw new TypeError ( 'storage.commitEvents must be a Function' ) ; if ( typeof storage . getEvents !== 'function' ) throw new TypeError ( 'storage.getEvents must be a Function' ) ; if ( typeof storage . getAggregateEvents !== 'function' ) throw new TypeError ( 'storage.getAggregateEvents must be a Function' ) ; if ( typeof storage . getSagaEvents !== 'function' ) throw new TypeError ( 'storage.getSagaEvents must be a Function' ) ; if ( typeof storage . getNewId !== 'function' ) throw new TypeError ( 'storage.getNewId must be a Function' ) ; }
Ensure provided eventStorage matches the expected format
@param {IEventStorage} storage
Ensure provided eventStorage matches the expected format