1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-12-31 19:44:10 -05:00
This commit is contained in:
Ryan Dahl 2019-01-24 13:14:03 -05:00
parent e87cd44033
commit f911eca8d1
2 changed files with 4 additions and 8 deletions

View file

@ -246,10 +246,7 @@ export async function writeFrame(frame: WebSocketFrame, writer: Writer) {
let header: Uint8Array;
const hasMask = frame.mask ? 0x80 : 0;
if (payloadLength < 126) {
header = new Uint8Array([
0x80 | frame.opcode,
hasMask | payloadLength
]);
header = new Uint8Array([0x80 | frame.opcode, hasMask | payloadLength]);
} else if (payloadLength < 0xffff) {
header = new Uint8Array([
0x80 | frame.opcode,

View file

@ -369,8 +369,7 @@ export class Sha1 {
arrayBuffer() {
this.finalize();
return Uint32Array.of(
this._h0, this._h1, this._h2, this._h3, this._h4
).buffer;
return Uint32Array.of(this._h0, this._h1, this._h2, this._h3, this._h4)
.buffer;
}
}