diff --git a/src/lib/isEmpty.js b/src/lib/isEmpty.js index 1e7398d..11730b3 100644 --- a/src/lib/isEmpty.js +++ b/src/lib/isEmpty.js @@ -6,7 +6,7 @@ export const isEmpty = (obj) => { } else if ( ["boolean", "number", "bigint", "symbol", "function"].includes(typeof obj) ) { - throw new Error(`Unsuported type: ${typeof obj}`); + throw new Error(`Unsupported type: ${typeof obj}`); } else { return Object.keys(obj).length === 0; } diff --git a/src/lib/isEmpty.test.js b/src/lib/isEmpty.test.js index 0f448ac..ed18fb6 100644 --- a/src/lib/isEmpty.test.js +++ b/src/lib/isEmpty.test.js @@ -43,7 +43,7 @@ test("isEmpty throws for unsupported types", (t) => { isEmpty(true); }, { - message: "Unsuported type: boolean", + message: "Unsupported type: boolean", }, ); assert.throws( @@ -51,7 +51,7 @@ test("isEmpty throws for unsupported types", (t) => { isEmpty(1); }, { - message: "Unsuported type: number", + message: "Unsupported type: number", }, ); assert.throws( @@ -59,7 +59,7 @@ test("isEmpty throws for unsupported types", (t) => { isEmpty(BigInt(9007199254740991)); }, { - message: "Unsuported type: bigint", + message: "Unsupported type: bigint", }, ); assert.throws( @@ -67,7 +67,7 @@ test("isEmpty throws for unsupported types", (t) => { isEmpty(Symbol("foo")); }, { - message: "Unsuported type: symbol", + message: "Unsupported type: symbol", }, ); assert.throws( @@ -75,7 +75,7 @@ test("isEmpty throws for unsupported types", (t) => { isEmpty(() => {}); }, { - message: "Unsuported type: function", + message: "Unsupported type: function", }, ); });