SyntaxFix
Write A Post
Hire A Developer
Questions
A ramda one liner:
import { compose, sum, values, } from 'ramda' export const sumValues = compose(sum, values);
Use: const summed = sumValues({ 'a': 1 , 'b': 2 , 'c':3 });
const summed = sumValues({ 'a': 1 , 'b': 2 , 'c':3 });