-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Proxy
process
with additional exports
Closes #33.
- Loading branch information
Showing
6 changed files
with
134 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,114 @@ | ||
import _process from 'process/browser.js'; | ||
|
||
function noop() {} | ||
|
||
const nextTick = _process.nextTick; | ||
const title = _process.title; | ||
const browser = _process.browser; | ||
const environment = _process.env; | ||
const argv = _process.argv; | ||
const version = _process.version; | ||
const versions = _process.versions; | ||
const on = _process.on; | ||
const addListener = _process.addListener; | ||
const once = _process.once; | ||
const off = _process.off; | ||
const removeListener = _process.removeListener; | ||
const removeAllListeners = _process.removeAllListeners; | ||
const emit = _process.emit; | ||
const emitWarning = noop; | ||
const prependListener = _process.prependListener; | ||
const prependOnceListener = _process.prependOnceListener; | ||
const listeners = _process.listeners; | ||
const binding = _process.binding; | ||
const cwd = _process.cwd; | ||
const chdir = _process.chdir; | ||
const umask = _process.umask; | ||
const exit = noop; | ||
const pid = 1; | ||
const features = {}; | ||
const kill = noop; | ||
const dlopen = noop; | ||
const uptime = noop; | ||
const memoryUsage = noop; | ||
const uvCounters = noop; | ||
const platform = 'browser'; | ||
const arch = 'browser'; | ||
const execPath = 'browser'; | ||
const execArgv = /** @type {string[]} */ ([]); | ||
|
||
const api = { | ||
nextTick, | ||
title, | ||
browser, | ||
env: environment, | ||
argv, | ||
version, | ||
versions, | ||
on, | ||
addListener, | ||
once, | ||
off, | ||
removeListener, | ||
removeAllListeners, | ||
emit, | ||
emitWarning, | ||
prependListener, | ||
prependOnceListener, | ||
listeners, | ||
binding, | ||
cwd, | ||
chdir, | ||
umask, | ||
exit, | ||
pid, | ||
features, | ||
kill, | ||
dlopen, | ||
uptime, | ||
memoryUsage, | ||
uvCounters, | ||
platform, | ||
arch, | ||
execPath, | ||
execArgv | ||
}; | ||
|
||
export default api; | ||
|
||
export { | ||
nextTick, | ||
title, | ||
browser, | ||
environment as env, | ||
argv, | ||
version, | ||
versions, | ||
on, | ||
addListener, | ||
once, | ||
off, | ||
removeListener, | ||
removeAllListeners, | ||
emit, | ||
emitWarning, | ||
prependListener, | ||
prependOnceListener, | ||
listeners, | ||
binding, | ||
cwd, | ||
chdir, | ||
umask, | ||
exit, | ||
pid, | ||
features, | ||
kill, | ||
dlopen, | ||
uptime, | ||
memoryUsage, | ||
uvCounters, | ||
platform, | ||
arch, | ||
execPath, | ||
execArgv | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters