MCPcopy Create free account
hub / github.com/bytenode/bytenode / loaderCodeCommonJS

Function loaderCodeCommonJS

lib/index.js:544–556  ·  view source on GitHub ↗
(targetPath, sheBang)

Source from the content-addressed store, hash-verified

542};
543
544const loaderCodeCommonJS = function (targetPath, sheBang) {
545 const lines = [
546 `require('bytenode')`,
547 ``,
548 `module.exports = require('${targetPath}')`
549 ];
550
551 if (sheBang) {
552 lines.unshift(sheBang, '');
553 }
554
555 return lines.join('\n');
556};
557
558const loaderCodeModule = function (targetPath, sheBang, loaderFilePath) {
559 const lines = [

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…