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

Function getCustomConfigNames

deps/npm/lib/commands/completion.js:241–250  ·  view source on GitHub ↗
(customDefs)

Source from the content-addressed store, hash-verified

239
240// Helper to get all config names including aliases from custom definitions
241const getCustomConfigNames = (customDefs) => {
242 const names = new Set()
243 for (const def of customDefs) {
244 names.add(def.key)
245 if (def.alias && Array.isArray(def.alias)) {
246 def.alias.forEach(a => names.add(a))
247 }
248 }
249 return [...names]
250}
251
252// the current word has a dash.
253// Return the config names with the same number of dashes as the current word has.

Callers 1

configComplFunction · 0.85

Calls 2

addMethod · 0.65
forEachMethod · 0.65

Tested by

no test coverage detected