()
| 18455 | }; |
| 18456 | function createFrame(data, hint) { |
| 18457 | return new WebsocketFrameSend(toBuffer(data, hint)).createFrame(hint === sendHints.string ? opcodes.TEXT : opcodes.BINARY); |
| 18458 | } |
| 18459 | function toBuffer(data, hint) { |
| 18460 | switch (hint) { |
| 18461 | case sendHints.string: |
| 18462 | return Buffer.from(data); |
| 18463 | case sendHints.arrayBuffer: |
nothing calls this directly
no test coverage detected