blob: ed0e13ec99325c8e0e71ff8c940d6fd0bcf2c4cd [file] [log] [blame]
Yang Guo4fd355c2019-09-19 08:59:031'use strict';
2
3const getPolyfill = require('./polyfill');
4
5module.exports = () => {
6 const polyfill = getPolyfill();
7 if (polyfill !== process.allowedNodeEnvironmentFlags) {
8 Object.defineProperty(process, 'allowedNodeEnvironmentFlags', {
9 writable: true,
10 enumerable: true,
11 configurable: true,
12 value: polyfill
13 });
14 }
15 return polyfill;
16};