Skip to content

Instantly share code, notes, and snippets.

View tpae's full-sized avatar

Terence Pae tpae

  • San Francisco, CA
  • X @tpae
View GitHub Profile
// Includes functions for exporting active sheet or all sheets as JSON object (also Python object syntax compatible).
// Tweak the makePrettyJSON_ function to customize what kind of JSON to export.
var FORMAT_ONELINE = 'One-line';
var FORMAT_MULTILINE = 'Multi-line';
var FORMAT_PRETTY = 'Pretty';
var LANGUAGE_JS = 'JavaScript';
var LANGUAGE_PYTHON = 'Python';
/*
* Enhances 'require' from RequireJS with Promises API while preserving its original semantics.
*/
(function() {
if (!Promise || !require) {
return;
}