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