/
githubmirror
/
ionic
Обзор
Документация
Войти
/
githubmirror
/
ionic
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
packages/react/src/components/react-component-lib/utils/dev.ts
14 строк
349 B
William Martin
refactor(react): transition to Stencil React bindings (#23826)
01 сен 2021, 00:29
Не верифицирован
01 сен 2021, 00:29
1680b0c
Код
Авторство
О чём код?
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; } } };