Maps a function over the values of an object.
mapValues = (obj, f) ->
result = {}
result[k] = f(v) for k, v of obj
result
{ok, deepEqual} = require 'assert'
eq = deepEqual
data =
one: 1
two: 2
three: 3
eq mapValues(data, (v) -> v * v),
one: 1
two: 4
three: 9