Skip to content

Instantly share code, notes, and snippets.

@oshliaer
Created February 13, 2017 03:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save oshliaer/e8d988b96da993502b06fb26eeff0b43 to your computer and use it in GitHub Desktop.
Save oshliaer/e8d988b96da993502b06fb26eeff0b43 to your computer and use it in GitHub Desktop.
function loadlib(libUrl) {
var cacheHandler = new CacheHandler(21600, CacheService.getScriptCache());
if ((typeof alasql) === 'undefined') {
var cs = cacheHandler.getCache(libUrl);
if (!cs) {
Logger.log('New cache');
cs = UrlFetchApp.fetch(libUrl).getContentText();
cacheHandler.putCache(cs, libUrl);
}
eval(cs);
}
}
loadlib('https://raw.githubusercontent.com/agershun/alasql/develop/dist/alasql.min.js')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment