utils/utils.js
function hasValidToken (storageLocation) {
	var token = getStoredToken(storageLocation);
	if (token) {
		try {
			var payload = decode(token);
			return payloadIsValid(payload);
		} catch (error) {
			return false;
		}
	}
	return false;
}
function hasValidToken (storageLocation) {
	var token = getStoredToken(storageLocation);
	if (token) {
		try {
			var payload = decode(token);
			return payloadIsValid(payload);
		} catch (error) {
			return false;
		}
	}
	return false;
}
function hasValidToken ( storageLocation ) { var token = getStoredToken ( storageLocation ) ; if ( token ) { try { var payload = decode ( token ) ; return payloadIsValid ( payload ) ; } catch ( error ) { return false ; } } return false ; }
Gets a stored token and returns a boolean of whether it was valid.
Gets a stored token and returns a boolean of whether it was valid .