@gecut/utilities
Version:
The ultimate utility toolkit from Gecut Company, crafted with TypeScript for optimal speed and efficiency. Designed to boost productivity with a suite of fast and optimized tools.
13 lines • 370 B
JavaScript
import { isBrowser } from './browser-or-node.js';
export function env(name, defaultValue, type) {
if (isBrowser())
return defaultValue;
const environment = process.env[name];
if (environment == null)
return defaultValue;
if (type === 'number') {
return +environment;
}
return environment;
}
//# sourceMappingURL=env.js.map