UNPKG

@modern-kit/utils

Version:
17 lines (14 loc) 394 B
import { objectKeys } from '../objectKeys/index.mjs'; function mapKeys(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 newKey = iteratee({ key, value, obj }); result[newKey] = value; } return result; } export { mapKeys }; //# sourceMappingURL=index.mjs.map