MCPcopy Create free account
hub / github.com/breck7/scroll / _getEnumOptions

Method _getEnumOptions

external/.scrollLibs.js:19223–19230  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

19221 if (preludeKind) return preludeKind.defaultPaint
19222 }
19223 _getEnumOptions() {
19224 const enumParticle = this._getParticleFromExtended(ParsersConstants.enum)
19225 if (!enumParticle) return undefined
19226 // we sort by longest first to capture longest match first. todo: add test
19227 const options = Object.keys(enumParticle.getParticle(ParsersConstants.enum).getOptions())
19228 options.sort((a, b) => b.length - a.length)
19229 return options
19230 }
19231 get optionCount() {
19232 const enumOptions = this._getEnumOptions()
19233 if (enumOptions) return enumOptions.length

Callers 4

optionCountMethod · 0.95
regexStringMethod · 0.95
cueEnumOptionsMethod · 0.80

Calls 4

getOptionsMethod · 0.80
sortMethod · 0.80
getParticleMethod · 0.45

Tested by

no test coverage detected