mirror of
https://github.com/He4eT/xecut-site.git
synced 2026-05-04 17:37:26 +00:00
filters: sumObjectValues: lint
This commit is contained in:
parent
f23f3a8841
commit
2016417a74
1 changed files with 1 additions and 1 deletions
|
|
@ -4,7 +4,7 @@
|
|||
* @param {Record<string, unknown>} obj
|
||||
* @returns {number}
|
||||
*/
|
||||
export const sumObjectValues = (obj) => {
|
||||
export function sumObjectValues (obj) {
|
||||
return Object.values(obj)
|
||||
.filter((x) => typeof x === 'number')
|
||||
.reduce((sum, x) => sum + x, 0)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue