lib/storeRedis.js
function( roomID ) {

		if( keys.length > 0 ) {

			var randIdx = Math.round( Math.random() * ( keys.length - 1 ) ),
				key = keys.splice( randIdx, 1 )[ 0 ];

			keyToId[ key ] = roomID;
			idToKey[ roomID ] = key;

			return promise.resolve( key );
		} else {

			return promise.reject( 'Run out of keys' );
		}
	}
function( roomID ) {

		if( keys.length > 0 ) {

			var randIdx = Math.round( Math.random() * ( keys.length - 1 ) ),
				key = keys.splice( randIdx, 1 )[ 0 ];

			keyToId[ key ] = roomID;
			idToKey[ roomID ] = key;

			return promise.resolve( key );
		} else {

			return promise.reject( 'Run out of keys' );
		}
	}
function ( roomID ) { if ( keys . length > 0 ) { var randIdx = Math . round ( Math . random ( ) * ( keys . length - 1 ) ) , key = keys . splice ( randIdx , 1 ) [ 0 ] ; keyToId [ key ] = roomID ; idToKey [ roomID ] = key ; return promise . resolve ( key ) ; } else { return promise . reject ( 'Run out of keys' ) ; } }
get a key which can be used to enter a room vs entering room via
roomID

@param  {String} roomID id of the room you'd like a key for
@return {Promise} A promise will be returned which will return a roomKey on success
get a key which can be used to enter a room vs entering room via roomID