Skip to content

Commit 8c4cb88

Browse files
committed
feat: merge function
1 parent 3efbb3a commit 8c4cb88

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

packages/jmespath/src/functions/Functions.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,8 @@ class Functions {
171171
/**
172172
* Merge the provided objects into a single object.
173173
*
174+
* Note that this is a shallow merge and will not merge nested objects.
175+
*
174176
* @param args The objects to merge
175177
* @returns The merged object
176178
*/

packages/jmespath/tests/unit/functions.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -724,7 +724,7 @@ describe('Functions tests', () => {
724724
expect(() => search(expression, data)).toThrow(error);
725725
});
726726

727-
/* it.each([
727+
it.each([
728728
{
729729
expression: 'merge(`{}`)',
730730
expected: {},
@@ -783,7 +783,7 @@ describe('Functions tests', () => {
783783
// Assess
784784
expect(result).toStrictEqual(expected);
785785
}
786-
); */
786+
);
787787

788788
it.each([
789789
{

0 commit comments

Comments
 (0)