MCPcopy
hub / github.com/codeceptjs/CodeceptJS / completer

Function completer

lib/pause.js:242–259  ·  view source on GitHub ↗
(line)

Source from the content-addressed store, hash-verified

240}
241
242function completer(line) {
243 const I = container.support('I')
244 const completions = methodsOfObject(I)
245 // If no input, return all completions
246 if (!line) {
247 return [completions, line]
248 }
249
250 // Search using Fuse.js
251 const searchResults = searchWithFusejs(completions, line, {
252 threshold: 0.3,
253 distance: 100,
254 minMatchCharLength: 1,
255 })
256 const hits = searchResults.map(result => result.item)
257
258 return [hits, line]
259}
260
261function registerVariable(name, value) {
262 registeredVariables[name] = value

Callers

nothing calls this directly

Calls 3

methodsOfObjectFunction · 0.90
searchWithFusejsFunction · 0.90
supportMethod · 0.80

Tested by

no test coverage detected