Skip to content

Commit

Permalink
style: format files
Browse files Browse the repository at this point in the history
  • Loading branch information
juanrgm committed Sep 9, 2023
1 parent 756d47e commit 9356e2f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ const objectA = {};
merge.recursive(
objectA,
{ level: { value: 1 } },
{ level: { str: "hello world" } }
{ level: { str: "hello world" } },
);
const objectB = merge.recursive(true, objectA, { level: { value: 2 } });

Expand Down
8 changes: 4 additions & 4 deletions test/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ describe("merge", () => {
expect(
merge(...values, [0, 1, 2], ...values, { a: 1 }, ...values, {
b: 2,
})
}),
).toStrictEqual({ a: 1, b: 2 });
});

Expand Down Expand Up @@ -96,7 +96,7 @@ describe("merge", () => {

it("is safe", () => {
expect(
merge({}, JSON.parse('{"__proto__": {"evil": true}}'))
merge({}, JSON.parse('{"__proto__": {"evil": true}}')),
).toStrictEqual({});
expect(({} as any).evil).toBeUndefined();
});
Expand Down Expand Up @@ -151,11 +151,11 @@ describe("recursive", () => {
});

expect(
recursive({ a: { b: [1, 2, 3], c: 1 } }, { a: { b: ["a"] } })
recursive({ a: { b: [1, 2, 3], c: 1 } }, { a: { b: ["a"] } }),
).toStrictEqual({ a: { b: ["a"], c: 1 } });

expect(
recursive({ a: { b: { b: 2 }, c: 1 } }, { a: { b: 2 } })
recursive({ a: { b: { b: 2 }, c: 1 } }, { a: { b: 2 } }),
).toStrictEqual({
a: { b: 2, c: 1 },
});
Expand Down

0 comments on commit 9356e2f

Please sign in to comment.