UNPKG

@modern-kit/utils

Version:
17 lines (14 loc) 400 B
import { objectKeys } from '../objectKeys/index.mjs'; function mapValues(obj, iteratee) { const result = {}; const keys = objectKeys(obj); for (let i = 0; i < keys.length; i++) { const key = keys[i]; const value = obj[key]; const newValue = iteratee({ key, value, obj }); result[key] = newValue; } return result; } export { mapValues }; //# sourceMappingURL=index.mjs.map