MCPcopy Index your code
hub / github.com/nodejs/node / readNonJsFiles

Function readNonJsFiles

deps/npm/test/bin/windows-shims.js:10–16  ·  view source on GitHub ↗
(dir)

Source from the content-addressed store, hash-verified

8const { version } = require('../../package.json')
9
10const readNonJsFiles = (dir) => readdirSync(dir).reduce((acc, shim) => {
11 const p = join(dir, shim)
12 if (extname(p) !== '.js' && !statSync(p).isDirectory()) {
13 acc[shim] = readFileSync(p, 'utf-8')
14 }
15 return acc
16}, {})
17
18const ROOT = resolve(__dirname, '../..')
19const BIN = join(ROOT, 'bin')

Callers 1

windows-shims.jsFile · 0.85

Calls 7

reduceMethod · 0.80
readdirSyncFunction · 0.50
joinFunction · 0.50
extnameFunction · 0.50
statSyncFunction · 0.50
readFileSyncFunction · 0.50
isDirectoryMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…