experimentalWarning.js 460 B

1234567891011121314151617
  1. 'use strict'
  2. var experimentalWarnings = new Set();
  3. function emitExperimentalWarning(feature) {
  4. if (experimentalWarnings.has(feature)) return;
  5. var msg = feature + ' is an experimental feature. This feature could ' +
  6. 'change at any time';
  7. experimentalWarnings.add(feature);
  8. process.emitWarning(msg, 'ExperimentalWarning');
  9. }
  10. function noop() {}
  11. module.exports.emitExperimentalWarning = process.emitWarning
  12. ? emitExperimentalWarning
  13. : noop;