UNPKG

@pushrocks/smartenv

Version:

store things about your environment and let them travel across modules

31 lines (30 loc) 858 B
export interface IEnvObject { name: string; value: string; } /** * Smartenv class that makes it easy */ export declare class Smartenv { getEnvAwareModule(optionsArg: { nodeModuleName: string; webUrlArg: string; getFunction: () => any; }): Promise<any>; getSafeNodeModule<T = any>(moduleNameArg: string): Promise<T>; loadedScripts: string[]; getSafeWebModule(urlArg: string, getFunctionArg: () => any): Promise<any>; get runtimeEnv(): "browser" | "node"; get isBrowser(): boolean; get userAgent(): string; get isNode(): boolean; get nodeVersion(): string; get isCI(): boolean; isMacAsync(): Promise<boolean>; isWindowsAsync(): Promise<boolean>; isLinuxAsync(): Promise<boolean>; /** * prints the environment to console */ printEnv(): Promise<void>; }