@cainiaofe/cn-utils
Version:
菜鸟前端基础工具库
19 lines (18 loc) • 582 B
TypeScript
export declare const PROD = "prod";
export declare const PRE = "pre";
export declare const TEST = "test";
export declare const DAILY = "daily";
export declare const LOCAL = "local";
export type ENV = typeof PROD | typeof PRE | typeof TEST | typeof DAILY | typeof LOCAL;
export interface CnEnvOptions {
/**
* 待匹配的域名, 默认读取 window.location.hostname
*/
hostname?: string;
/**
* 当前 script 的 src, 默认读取顺序
* window.__CURRENT_SCRIPT_SRC__
* window.document.currentScript.src
*/
currentScriptSrc?: string;
}