all files / dist/ smartenv.classes.js

68.75% Statements 11/16
33.33% Branches 2/6
100% Functions 2/2
73.33% Lines 11/15
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26                             
#!/usr/bin/env node
 
/// <reference path="typings/main.d.ts" />
var Environment = (function () {
    function Environment(runtimeEnvArg, userAgentArg) {
        Iif (userAgentArg === void 0) { userAgentArg = "undefined"; }
        this.runtimeEnv = runtimeEnvArg;
        this.userAgent = userAgentArg;
        Eif (runtimeEnvArg == "node") {
            this.isBrowser = false;
            this.isNode = true;
            this.nodeVersion = process.version;
        }
        else if (runtimeEnvArg == "browser") {
            this.isBrowser = true;
            this.isNode = false;
            this.nodeVersion = "undefined";
        }
    }
    ;
    return Environment;
})();
exports.Environment = Environment;
 
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNtYXJ0ZW52LmNsYXNzZXMudHMiXSwibmFtZXMiOlsiRW52aXJvbm1lbnQiLCJFbnZpcm9ubWVudC5jb25zdHJ1Y3RvciJdLCJtYXBwaW5ncyI6IkFBQUEsMENBQTBDO0FBQzFDO0lBTUlBLHFCQUFZQSxhQUFvQkEsRUFBQ0EsWUFBaUNBO1FBQWpDQyw0QkFBaUNBLEdBQWpDQSwwQkFBaUNBO1FBQzlEQSxJQUFJQSxDQUFDQSxVQUFVQSxHQUFHQSxhQUFhQSxDQUFDQTtRQUNoQ0EsSUFBSUEsQ0FBQ0EsU0FBU0EsR0FBR0EsWUFBWUEsQ0FBQ0E7UUFDOUJBLEVBQUVBLENBQUFBLENBQUNBLGFBQWFBLElBQUlBLE1BQU1BLENBQUNBLENBQUFBLENBQUNBO1lBQ3hCQSxJQUFJQSxDQUFDQSxTQUFTQSxHQUFHQSxLQUFLQSxDQUFDQTtZQUN2QkEsSUFBSUEsQ0FBQ0EsTUFBTUEsR0FBR0EsSUFBSUEsQ0FBQ0E7WUFDbkJBLElBQUlBLENBQUNBLFdBQVdBLE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