UNPKG

256 BJavaScriptView Raw
1/* eslint-disable no-console */
2'use strict'
3
4let printed = {}
5
6module.exports = function warnOnce(message) {
7 if (printed[message]) return
8 printed[message] = true
9
10 if (typeof console !== 'undefined' && console.warn) {
11 console.warn(message)
12 }
13}