dist/utilify.esm.js
function renameKeys(obj, keysMap) {
        if (!validateHelpers.isPlainObject(obj)) {
            throw new Error('\'obj\' must be an plain object');
        }

        return Object.keys(obj).reduce(function (acc, key) {
            return _extends({}, acc, defineProperty({}, keysMap[key] || key, obj[key]));
        }, {});
    }
function renameKeys(obj, keysMap) {
        if (!validateHelpers.isPlainObject(obj)) {
            throw new Error('\'obj\' must be an plain object');
        }

        return Object.keys(obj).reduce(function (acc, key) {
            return _extends({}, acc, defineProperty({}, keysMap[key] || key, obj[key]));
        }, {});
    }
function renameKeys ( obj , keysMap ) { if ( ! validateHelpers . isPlainObject ( obj ) ) { throw new Error ( '\'obj\' must be an plain object' ) ; } return Object . keys ( obj ) . reduce ( function ( acc , key ) { return _extends ( { } , acc , defineProperty ( { } , keysMap [ key ] || key , obj [ key ] ) ) ; } , { } ) ; }
Replaces the names of multiple object keys with the values provided.

@param  {Object}   obj       The plain object
@param  {Object}   keysMap   Object with key and value to replace
@returns {Object}
@example
const obj = { name: 'John', surename: 'Smith', age: 20 };
renameKeys(obj, { name: 'firstName', surename: 'lastName' });
//=> { firstName: 'John', lastName: 'Smith', age: 20 }
Replaces the names of multiple object keys with the values provided .