code: function pad(n, p) {
      p = p || 2;
      var rv = '0000' + n;
      return rv.slice(-p);
  }
docs: Helper library for safe code execution/compilation, including dumping offending code to file for further error analysis (the idea was originally coded in https://github.com/GerHobbelt/jison/commit/85e367d03b977780516d2b643afbe6f65ee758f2 )  MIT Licensed   This code is intended to help test and diagnose arbitrary chunks of code, answering questions like this:  the given code fails, but where exactly and why? It's precise failure conditions are 'hidden' due to the stuff running inside an `eval()` or `Function(...)` call, so we want the code dumped to file so that we can test the code in a different environment so that we can see what precisely is causing the failure.  Helper function: pad number with leading zeroes