-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.js
More file actions
29 lines (23 loc) · 748 Bytes
/
index.js
File metadata and controls
29 lines (23 loc) · 748 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
const process = module.exports = {}
process.title = 'browser'
process.browser = true
process.env = {}
process.argv = []
process.version = ''
process.versions = {}
function noop () {}
process.on = noop
process.addListener = noop
process.once = noop
process.off = noop
process.removeListener = noop
process.removeAllListeners = noop
process.emit = noop
process.prependListener = noop
process.prependOnceListener = noop
process.nextTick = (func, ...args) => window.queueMicrotask(() => func(...args))
process.listeners = (name) => []
process.cwd = () => '/'
process.umask = () => 0
process.binding = (name) => { throw new Error('process.binding is not supported') }
process.chdir = (dir) => { throw new Error('process.chdir is not supported') }