14 lines
254 B
TypeScript
14 lines
254 B
TypeScript
import process from 'node:process';
|
|
|
|
const currentPlatform = process.env.UNI_PLATFORM;
|
|
const isH5 = currentPlatform === 'h5';
|
|
const isApp = currentPlatform === 'app';
|
|
const isMp = !isH5 && !isApp;
|
|
|
|
export {
|
|
isH5,
|
|
isApp,
|
|
isMp,
|
|
currentPlatform,
|
|
};
|