Skip to content

Commit 6396c5b

Browse files
committed
chore: minor simplification
1 parent 2f430f1 commit 6396c5b

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/stringify.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,7 @@ const DEFAULT_INDENTATION = ' '
3333
*/
3434
export const stringify = (query: JSONQuery, options?: JSONQueryStringifyOptions) => {
3535
const space = options?.indentation ?? DEFAULT_INDENTATION
36-
const allOperators =
37-
// biome-ignore lint/performance/noAccumulatingSpread: <explanation>
38-
[...operators, ...(options?.operators ?? [])].reduce((all, ops) => ({ ...all, ...ops }), {}) ??
39-
{}
36+
const allOperators = Object.assign({}, ...operators, ...(options?.operators ?? []))
4037

4138
const _stringify = (query: JSONQuery, indent: string) =>
4239
isArray(query) ? stringifyFunction(query as JSONQueryFunction, indent) : JSON.stringify(query) // value (string, number, boolean, null)

0 commit comments

Comments
 (0)