Test name | Executions per second |
---|---|
lodash.mapKeys | 980575.6 Ops/sec |
native | 436309.2 Ops/sec |
<script src="https://cdn.jsdelivr.net/lodash/4.16.0/lodash.min.js"></script>
var value = {a: 30310, b: 100303, c: 3040494};
_.mapKeys(value, k => k + '-changed')
Object.assign({}, Object.keys(value).map(k => ({ [k + '-changed']: value[k] })))