Lodash/Underscore on Google App Script

2015-03-12 15:02:25 -0400

I've recently been working on a Google App Script project, and wanted to use Underscore or Lodash because writing Javascript is relatively painful without those libraries. The problem is that Lodash does a lot of feature detection by trying to throw exceptions, and the Google App Script debugger pauses on all exceptions.

The fix is to just modify Lodash slightly to hard-code the Google App Script features that throw exceptions. This isn't too hard to do, but it is a pain, so I've posted my modified version of Lodash as a Gist here.