2.1.0 • Published 6 years ago
@agderposten/environment-functions v2.1.0
Environment functions
Easy access to AGM environment functions.
Fetch environment information by ID
import {fetchEnvironmentByEnvironmentId} from '@agderposten/environment-functions';
fetchEnvironmentByEnvironmentId('4d63d444-d418-4981-8c0e-f5d26ea334db')
.then((environment) => {
console.log(environment.name); // > Agderposten
});
Fetch environment information by hostname
import {fetchEnvironmentByHostname} from '@agderposten/environment-functions';
fetchEnvironmentByHostname('agderposten.no')
.then((environment) => {
console.log(environment.name); // > Agderposten
});