@reputex/react-widget
Version:
React widget by the ReputeX team for displaying ReputeX scores of users.
15 lines (12 loc) • 349 B
text/typescript
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;
}
}
};