Skip to content

Commit

Permalink
refactor: format code with prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
rChaoz committed Mar 19, 2024
1 parent b4bd2df commit ee3c47a
Show file tree
Hide file tree
Showing 8 changed files with 21 additions and 14 deletions.
8 changes: 4 additions & 4 deletions lib/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import {Emitter} from "@socket.io/component-emitter";
import {deconstructPacket, reconstructPacket} from "./binary.js";
import {hasBinary, isBinary} from "./is-binary.js";
import { Emitter } from "@socket.io/component-emitter";
import { deconstructPacket, reconstructPacket } from "./binary.js";
import { hasBinary, isBinary } from "./is-binary.js";
import debugModule from "debug"; // debug()
import * as devalue from "devalue";

Expand Down Expand Up @@ -148,7 +148,7 @@ export class Decoder extends Emitter<{}, {}, DecoderReservedEvents> {
/**
* Decoder constructor
*
* @param {function?} revivers - custom reviver to pass down to `devalue.parse`
* @param {Object?} revivers - custom revivers to pass down to `devalue.parse`
*/
constructor(private revivers?: Record<string, (value: any) => any>) {
super();
Expand Down
2 changes: 1 addition & 1 deletion test/arraybuffer.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {Encoder, PacketType} from "../build/esm/index.js";
import { Encoder, PacketType } from "../build/esm/index.js";
import expect from "expect.js";
import * as helpers from "./helpers.js";

Expand Down
2 changes: 1 addition & 1 deletion test/blob.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {PacketType} from "../build/esm/index.js";
import { PacketType } from "../build/esm/index.js";
import * as helpers from "./helpers.js";

const BlobBuilderImpl =
Expand Down
6 changes: 4 additions & 2 deletions test/buffer.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {Decoder, PacketType} from "../build/esm/index.js";
import { Decoder, PacketType } from "../build/esm/index.js";
import * as helpers from "./helpers.js";
import expect from "expect.js";

Expand Down Expand Up @@ -34,7 +34,9 @@ describe("Buffer", () => {
const decoder = new Decoder();

expect(() => {
decoder.add('51-[[1,2],"hello",{"_placeholder":3,"num":4},true,"splice"]');
decoder.add(
'51-[[1,2],"hello",{"_placeholder":3,"num":4},true,"splice"]'
);
decoder.add(Buffer.from("world"));
}).to.throwException(/^illegal attachments$/);
});
Expand Down
6 changes: 3 additions & 3 deletions test/helpers.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as parser from "../build/esm/index.js"
import expect from "expect.js"
import * as parser from "../build/esm/index.js";
import expect from "expect.js";

const encoder = new parser.Encoder();

Expand Down Expand Up @@ -35,4 +35,4 @@ const test_bin = (obj) => {
});
};

export { test, test_bin }
export { test, test_bin };
7 changes: 6 additions & 1 deletion test/parser.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
import {Decoder, Encoder, isPacketValid, PacketType} from "../build/esm/index.js";
import {
Decoder,
Encoder,
isPacketValid,
PacketType,
} from "../build/esm/index.js";
import expect from "expect.js";
import * as helpers from "./helpers.js";

Expand Down
2 changes: 1 addition & 1 deletion test/support/env.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
// some tests do not yet work in both
const browser = typeof window !== "undefined";

export { browser }
export { browser };
2 changes: 1 addition & 1 deletion wdio.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,4 +91,4 @@ if (process.env.CI === "true") {
];
}

export { config }
export { config };

0 comments on commit ee3c47a

Please sign in to comment.