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

Method readFiles

deps/npm/lib/commands/help-search.js:34–41  ·  view source on GitHub ↗
(files)

Source from the content-addressed store, hash-verified

32 }
33
34 async readFiles (files) {
35 const res = {}
36 await Promise.all(files.map(async file => {
37 res[file] = (await readFile(file, 'utf8'))
38 .replace(/^---\n(.*\n)*?---\n/, '').trim()
39 }))
40 return res
41 }
42
43 async searchFiles (args, data) {
44 const results = []

Callers 1

execMethod · 0.95

Calls 3

allMethod · 0.80
mapMethod · 0.65
readFileFunction · 0.50

Tested by

no test coverage detected