MCPcopy Create free account
hub / github.com/easydiffusion/easydiffusion / f

Function f

ui/media/js/main.js:698–711  ·  view source on GitHub ↗
(tree)

Source from the content-addressed store, hash-verified

696// gets a flat list of all models of a certain type, ignoring directories
697function getAllModelNames(type) {
698 function f(tree) {
699 if (tree == undefined) {
700 return []
701 }
702 let result = []
703 tree.forEach((e) => {
704 if (typeof e == "object") {
705 result = result.concat(f(e[1]))
706 } else {
707 result.push(e)
708 }
709 })
710 return result
711 }
712 return f(modelsOptions[type])
713}
714

Callers 3

getAllModelNamesFunction · 0.70
getAllModelPathesFunction · 0.70

Calls 1

pushMethod · 0.80

Tested by

no test coverage detected