You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

15 lines
457 B

import isNil from './is-nil';
import isObject from './is-object';
var identity = function (v) { return v; };
export default (function (object, func) {
if (func === void 0) { func = identity; }
var r = {};
if (isObject(object) && !isNil(object)) {
Object.keys(object).forEach(function (key) {
// @ts-ignore
r[key] = func(object[key], key);
});
}
return r;
});
//# sourceMappingURL=map-values.js.map