Yang Guo | 4fd355c | 2019-09-19 08:59:03 | [diff] [blame] | 1 | 'use strict'; |
2 | |||||
3 | const getPolyfill = require('./polyfill'); | ||||
4 | |||||
5 | module.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 | }; |