UNPKG

art-standard-lib

Version:

The Standard Library for JavaScript that aught to be.

49 lines (35 loc) 1.27 kB
// Generated by CoffeeScript 1.12.7 (function() { var Environment, ParseUrl, defineModule, isNode, isString; defineModule = require('./CommonJs').defineModule; ParseUrl = require('./ParseUrl'); isString = require('./Core').isString; isNode = require('detect-node'); defineModule(module, Environment = (function() { function Environment() {} Environment.getEnv = function() { var k, out, v; return global.environment != null ? global.environment : global.environment = ((function() { var ref, ref1; if (global.location != null) { out = ParseUrl.parseQuery(); ref = global.location; for (k in ref) { v = ref[k]; if (k !== "search" && isString(v) && v.length > 0) { out[k] = v; } } return out; } else { return (ref1 = global.process) != null ? ref1.env : void 0; } })()) || {}; }; Environment.isBrowser = !!(global.window && global.navigator && global.document); Environment.isWebWorker = !!(!Environment.isBrowser && global.importScripts); Environment.isNode = !!isNode; return Environment; })()); }).call(this); //# sourceMappingURL=Environment.js.map