You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

13 lines
256 B

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