Test name | Executions per second |
---|---|
Dot notation property setter | 3536140.5 Ops/sec |
Lodash.set | 12878515.0 Ops/sec |
<script src="https://cdn.jsdelivr.net/npm/lodash@4.17.5/lodash.min.js"></script>
var person = { name: 'Foo', lastName: 'Bar' };
_.set(person, 'age', 10)
person.age = 10