strongloop/loopback-connector-rest — pull request #25 by clarkbw (2014-12-25 03:43:57+00:00)
Title: added lodash-node and defaults merge

This change does a merge of all options cascading from defaults, to the top level and finally the options objects. I was unclear what the correct merge order should actually be so I went with what seemed the most logical however I'm not entirely clear what the options object should have in terms of order of precedence. I tried to draw from your previous code that had an order of precedence but didn't merge the options in that order. If you want that corrected I can easily make changes.

Not sure if you guys are ok with an the add of lodash-node to the package but it provides much better utility functions than trying to do this all myself.
I also created a utils module to export a deep merge function that ensures all options are copied over from right to left.

Happy Holidays.