serverless-offline
Version:
Emulate AWS λ and API Gateway locally when developing your Serverless project
19 lines (14 loc) • 380 B
JavaScript
const { assign } = Object
export default class WebSocketEventDefinition {
constructor(rawWebSocketEventDefinition) {
let rest
let route
if (typeof rawWebSocketEventDefinition === "string") {
route = rawWebSocketEventDefinition
} else {
;({ route, ...rest } = rawWebSocketEventDefinition)
}
this.route = route
assign(this, rest)
}
}