Skip to content

thjiang/current-env

Repository files navigation

A library to get the current environment

Install

npm install current-env --save

Usage

ES2015:

import * as currentEnv from "current-env";
// ...
currentEnv.getEnv("domain");

CommonJS:

var currentEnv = require("current-env");
// ...
currentEnv.getEnv("domain");

AMD:

require(["currentEnv"], function(currentEnv) {
    // ...
    currentEnv.getEnv("domain");
});

CDN:

<!DOCTYPE html>
<html>
    <script src="https://unpkg.com/current-env/dist/current-env.js"></script>
    <script>
        window.currentEnv.getEnv("domain");
    </script>
</html>

LICENSE

MIT

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published