MCPcopy
hub / github.com/jishi/node-sonos-http-api / loadAsFileSync

Function loadAsFileSync

static/docs/lib/shred.bundle.js:42–51  ·  view source on GitHub ↗
(x)

Source from the content-addressed store, hash-verified

40 throw new Error("Cannot find module '" + x + "'");
41
42 function loadAsFileSync (x) {
43 if (require.modules[x]) {
44 return x;
45 }
46
47 for (var i = 0; i < require.extensions.length; i++) {
48 var ext = require.extensions[i];
49 if (require.modules[x + ext]) return x + ext;
50 }
51 }
52
53 function loadAsDirectorySync (x) {
54 x = x.replace(/\/+$/, '');

Callers 3

shred.bundle.jsFile · 0.85
loadAsDirectorySyncFunction · 0.85
loadNodeModulesSyncFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected