Objects have no map or filter, so the idiom is a round trip through arrays: Object.fromEntries(Object.entries(obj).map(([key, value]) => [key, fn(value)])).
Object.entries (ES2017) returns [key, value] arrays for the object's own, enumerable, string-keyed properties, in property order (integer-like keys ascending, then other strings in creation order). Its value comes from Get, so getters run. Between the two calls you have an array, so map changes values or keys, filter drops entries, and sort reorders them (though integer-like keys always come first again in the result).
Object.fromEntries (ES2019) takes any iterable of pairs — an array, a Map, a generator — and for each one runs ToPropertyKey on the key and CreateDataPropertyOrThrow on a new plain object. Later duplicates overwrite earlier ones. Because it defines properties rather than assigning them, a '__proto__' key becomes an ordinary own property instead of changing the prototype.
What the round trip drops: Symbol keys, non-enumerable properties, accessor-ness (a getter's current value is copied as data), property attributes, and the prototype — a class instance comes back as a plain object. It's also shallow: nested objects are shared.
Alternatives have trade-offs. A for…in loop with Object.hasOwn avoids the intermediate arrays but is more code. reduce with { ...acc, [key]: value } looks neat but copies the accumulator on every step, which is O(n²) for n keys; mutate one accumulator instead if you use reduce. For keys that aren't strings, or frequent additions and removals, convert to a Map: new Map(Object.entries(obj)).