Echo JS 0.11.0

<~>

zewish comments

zewish 2891 days ago. link 1 point
You should probably look at the code of the lodash.get module, one of the first lines of code does require('lodash._stringtopath').

Try to open this module and count only the the lines with code. All in all lodash.get is more than 200 lines of code :)
zewish 2891 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
zewish 2892 days ago. link 2 points
lodash.get is 200 lines of code and this is just 17 and it uses only builtin array and string functions.