UNPKG
@rinq/websocket
Version:
latest (0.2.1)
0.2.1
0.1.6
0.1.5
0.1.4
0.1.3
0.1.2
Rinq in the browser.
github.com/rinq/websocket
rinq/websocket
@rinq/websocket
/
serialization
/
select-by-type.js
8 lines
(6 loc)
•
189 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
module
.
exports
=
function
selectByType
(
type
, options
) {
if
(!options.
hasOwnProperty
(
type
)) {
throw
new
Error
(
'Unsupported message type: '
+
type
+
'.'
) }
return
options[
type
] }