MCPcopy
hub / github.com/plasma-umass/browsix / _require

Function _require

src/browser-node/browser-node.ts:165–190  ·  view source on GitHub ↗
(moduleName: string)

Source from the content-addressed store, hash-verified

163};
164
165function _require(moduleName: string): any {
166 'use strict';
167
168 switch (moduleName) {
169 case 'fs':
170 return fs;
171 case 'child_process':
172 return require('./child_process');
173 case 'net':
174 return require('./net');
175 case 'http':
176 return require('./http');
177 case 'path':
178 return require('./path');
179 case 'readline':
180 return require('./readline');
181 case 'util':
182 return require('./util');
183 case 'node-pipe2':
184 return modPipe2;
185 case 'node-priority':
186 return modPriority;
187 default:
188 throw new ReferenceError('unknown module ' + moduleName);
189 }
190}
191
192syscall.addEventListener('init', init.bind(this));
193function init(data: SyscallResponse): void {

Callers

nothing calls this directly

Calls 1

requireFunction · 0.85

Tested by

no test coverage detected