/
githubmirror
/
taro
Обзор
Документация
Войти
/
githubmirror
/
taro
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
packages/taro-components-library-react/src/react-component-lib/utils/dev.ts
18 строк
583 B
Zakary
feat(h5): 补充框架适配器运行时
29 мар 2023, 06:15
29 мар 2023, 06:15
e2200ea
Код
Авторство
О чём код?
/** * Modify from https://github.com/ionic-team/stencil-ds-output-targets/blob/main/packages/react-output-target/react-component-lib/utils/dev.ts * MIT License https://github.com/ionic-team/stencil-ds-output-targets/blob/main/LICENSE */ export const isDevMode = () => { return process && process.env && process.env.NODE_ENV === 'development' } const warnings: { [key: string]: boolean } = {} export const deprecationWarning = (key: string, message: string) => { if (isDevMode()) { if (!warnings[key]) { console.warn(message) warnings[key] = true } } }