This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
trait IdNewtype { | |
trait Tag extends Any | |
type Type <: Tag | |
def apply(value: UUID): Type = value.asInstanceOf[Type] | |
implicit def ops(id: Type): IdNewtype.Ops[Type] = new service.IdNewtype.Ops[Type](id) | |
def random() = apply(UUID.randomUUID()) | |
def parse(s: String): Option[Type] = Try(UUID.fromString(s)).toOption.map(apply) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const CMD_INNER_READY = 'innerReady' | |
const CMD_RESPONSE = 'response' | |
const CMD_WRAPPER_READY = 'wrapperReady' | |
const CMD_PING = 'ping' | |
const CMD_PONG = 'pong' | |
const CMD_WRAPPER_OPENED_WEBSOCKET = 'wrapperOpenedWebsocket' | |
const CMD_WRAPPER_CLOSE_WEBSOCKET = 'wrapperClosedWebsocket' | |
class ZeroFrame { | |
constructor(url) { |