UNPKG

finity

Version:

A finite state machine library for Node.js and the browser with a friendly configuration DSL

12 lines (11 loc) 300 B
"use strict"; exports.__esModule = true; exports.default = mapValues; function mapValues(obj, callback) { var prototype = Object.getPrototypeOf(obj); var result = Object.create(prototype); Object.keys(obj).forEach(function (key) { result[key] = callback(obj[key]); }); return result; }