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

Method _sortParticlesByInScopeOrder

external/.scrollLibs.js:18233–18240  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

18231 return this.getRunTimeEnumOptions(atom)
18232 }
18233 _sortParticlesByInScopeOrder() {
18234 const parserOrder = this.definition._getMyInScopeParserIds()
18235 if (!parserOrder.length) return this
18236 const orderMap = {}
18237 parserOrder.forEach((atom, index) => (orderMap[atom] = index))
18238 this.sort(Utils.makeSortByFn(runtimeParticle => orderMap[runtimeParticle.parserId]))
18239 return this
18240 }
18241 get requiredParticleErrors() {
18242 const errors = []
18243 Object.values(this.definition.cueMapWithDefinitions).forEach(def => {

Callers 2

formatMethod · 0.95
sortParsersMethod · 0.80

Calls 4

forEachMethod · 0.80
sortMethod · 0.80
makeSortByFnMethod · 0.80

Tested by

no test coverage detected