UNPKG

403 BJavaScriptView Raw
1import warning from 'warning';
2let warned = {};
3export default function warn(falseToWarn, message, ...args) {
4 if (!falseToWarn && message.indexOf('deprecated') !== -1) {
5 if (warned[message]) {
6 return;
7 }
8 warned[message] = true;
9 }
10 warning(falseToWarn, `[react-bootstrap-typeahead] ${message}`, ...args);
11}
12export function resetWarned() {
13 warned = {};
14}