UNPKG

swgg-github-repos

Version:

this zero-dependency package will provide a (nodejs-compatible) swagger-client for github-repos's web-apis, with a working web-demo

67 lines (63 loc) 2.04 kB
/* istanbul instrument in package swgg_github_repos */ /* jslint-utility2 */ /*jslint bitwise: true, browser: true, maxerr: 4, 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; /* istanbul ignore next */ if (local) { local = local.global.utility2_rollup || local.global.utility2_rollup_old || require('./assets.utility2.rollup.js'); local.fs = null; } // init exports if (local.modeJs === 'browser') { local.global.utility2_swgg_github_repos = local; } else { // require builtins Object.keys(process.binding('natives')).forEach(function (key) { if (!local[key] && !(/\/|^_|^assert|^sys$/).test(key)) { local[key] = require(key); } }); module.exports = local; module.exports.__dirname = __dirname; } // init lib local.local = local.swgg_github_repos = local; }()); }());