diff --git a/lib/index.ts b/lib/index.ts index dfcdbab..aaf6941 100644 --- a/lib/index.ts +++ b/lib/index.ts @@ -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"; @@ -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 any>) { super(); diff --git a/test/arraybuffer.js b/test/arraybuffer.js index 09649ec..713a64c 100644 --- a/test/arraybuffer.js +++ b/test/arraybuffer.js @@ -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"; diff --git a/test/blob.js b/test/blob.js index d4c8854..cbbb66b 100644 --- a/test/blob.js +++ b/test/blob.js @@ -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 = diff --git a/test/buffer.js b/test/buffer.js index 754256a..ea9448c 100644 --- a/test/buffer.js +++ b/test/buffer.js @@ -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"; @@ -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$/); }); diff --git a/test/helpers.js b/test/helpers.js index 9244995..304daac 100644 --- a/test/helpers.js +++ b/test/helpers.js @@ -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(); @@ -35,4 +35,4 @@ const test_bin = (obj) => { }); }; -export { test, test_bin } \ No newline at end of file +export { test, test_bin }; diff --git a/test/parser.js b/test/parser.js index ab21357..d1d37fc 100644 --- a/test/parser.js +++ b/test/parser.js @@ -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"; diff --git a/test/support/env.js b/test/support/env.js index d2c87e2..8e63a31 100644 --- a/test/support/env.js +++ b/test/support/env.js @@ -4,4 +4,4 @@ // some tests do not yet work in both const browser = typeof window !== "undefined"; -export { browser } +export { browser }; diff --git a/wdio.conf.js b/wdio.conf.js index 85873fb..97be090 100644 --- a/wdio.conf.js +++ b/wdio.conf.js @@ -91,4 +91,4 @@ if (process.env.CI === "true") { ]; } -export { config } +export { config };