UNPKG

google-webclient

Version:

this zero-dependency package will provide a swagger-client for google's web-apis, with a working web-demo

62 lines (58 loc) 1.91 kB
/* istanbul instrument in package swgg_google_all */ /*jslint bitwise: true, browser: true, maxerr: 8, maxlen: 100, node: true, nomen: true, regexp: true, stupid: true */ (function () { 'use strict'; var local; // run shared js-env code - init-before (function () { // init local local = {}; // init modeJs local.modeJs = (function () { try { return typeof navigator.userAgent === 'string' && typeof document.querySelector('body') === 'object' && typeof XMLHttpRequest.prototype.open === 'function' && 'browser'; } catch (errorCaughtBrowser) { return module.exports && typeof process.versions.node === 'string' && typeof require('http').createServer === 'function' && 'node'; } }()); // init global local.global = local.modeJs === 'browser' ? window : global; // init utility2_rollup local = local.global.utility2_rollup || local; // init lib local.local = local.swgg_google_all = local; // init exports if (local.modeJs === 'browser') { local.global.utility2_swgg_google_all = local; } else { // require builtins Object.keys(process.binding('natives')).forEach(function (key) { if (!local[key] && !(/\/|^_|^sys$/).test(key)) { local[key] = require(key); } }); module.exports = local; module.exports.__dirname = __dirname; module.exports.module = module; module.exports = local.global.utility2_rollup || require('./assets.utility2.rollup.js'); } }()); }());