()
| 8143 | |
| 8144 | var warned = false; |
| 8145 | function deprecated() { |
| 8146 | if (!warned) { |
| 8147 | if (config('throwDeprecation')) { |
| 8148 | throw new Error(msg); |
| 8149 | } else if (config('traceDeprecation')) { |
| 8150 | console.trace(msg); |
| 8151 | } else { |
| 8152 | console.warn(msg); |
| 8153 | } |
| 8154 | warned = true; |
| 8155 | } |
| 8156 | return fn.apply(this, arguments); |
| 8157 | } |
| 8158 | |
| 8159 | return deprecated; |
| 8160 | } |