Apples fn to every key of obj which is numeric.
fn
obj
const o = { name: 'john', x: 10, y: 20};const o2 = applyToValues(o, (v) => v * 2);// Yields: { name: 'john', x: 20, y: 40 } Copy
const o = { name: 'john', x: 10, y: 20};const o2 = applyToValues(o, (v) => v * 2);// Yields: { name: 'john', x: 20, y: 40 }
Apples
fn
to every key ofobj
which is numeric.