Echo JS 0.11.0

<~>
alonronin 3138 days ago. link parent 2 points
your code is nice and elegant, however lodash treats more use cases, and performance proved (not just saying 'fast' at the title)

i'd use lodash in my project, but i like yours also.

Replies

eliseumds 3138 days ago. link 0 point
And lodash has 203 contributors, has been around since 2009 and it's very likely that every JS developer will need more than _.get() in their projects.
zewish 3138 days ago. link 1 point
Guys, guys, I'm not trying to create a lodash-killer library. I myself am a happy user of lodash and I use it on a daily basis. I also respect John Dalton for creating and maintaining it. Bear with me, please :)

This is just my solution of the same problem _.get solves. If you're concerned about the performance I've created a small benchmark which runs _.get and oget 1000 times each with the same test case. I'm not saying it is always faster, but on node.js 4.4.4 LTS it is currently a little faster.

You may check the benchmark here:
https://github.com/zewish/oget/tree/master/benchmark

Results on my machine are:
[oget] average time: 16146.49
[_get] average time: 17311.53