1 | import warning from 'warning';
|
2 | let warned = {};
|
3 | export 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 | }
|
12 | export function resetWarned() {
|
13 | warned = {};
|
14 | }
|