Get rid of lots of unnecessary lodash calls.

This commit is contained in:
baldo 2022-07-28 13:16:13 +02:00
parent b734a422a7
commit 5592892f0d
16 changed files with 99 additions and 115 deletions
server/utils

View file

@ -2,7 +2,7 @@ import _ from "lodash";
export function inCondition<T>(field: string, list: T[]): {query: string, params: T[]} {
return {
query: '(' + field + ' IN (' + _.join(_.times(list.length, _.constant('?')), ', ') + '))',
query: '(' + field + ' IN (' + _.times(list.length, () =>'?').join(', ') + '))',
params: list,
}
}