zzarcon / nodegram

:metal: Simplest Instagram Api library in Javascript
145 stars 6 forks source link

fix: buildPath was mutating options passed as parameter #3

Closed rehia closed 7 years ago

rehia commented 7 years ago

buildPath() mutated the options object passed as parameter. As a consequence, it was hard to call get() multiple times in a raw, using the same options parameter. This fix allows to call get() with no side effect.

zzarcon commented 7 years ago

Sorry for the delay, this is a really good point which I didn't thought about it.

Implementation and tests looks good to me, merging now 🎉

rehia commented 7 years ago

ok thanks Hector !

zzarcon commented 7 years ago

@rehia btw, good job with the tests, I think those are actually the first ones which some real value of the current testsuite! 💪