MCPcopy Create free account
hub / github.com/compiler-explorer/compiler-explorer / populateBuiltins

Method populateBuiltins

static/widgets/load-save.ts:124–135  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

122 }
123
124 private async populateBuiltins() {
125 const builtins = (await this.fetchBuiltins()).filter(entry => this.currentLanguage?.id === entry.lang);
126 LoadSave.populate(
127 unwrap(this.modal).find('.examples'),
128 builtins.map(elem => {
129 return {
130 name: elem.name,
131 load: () => this.doLoad(elem),
132 };
133 }),
134 );
135 }
136
137 private populateLocalStorage() {
138 const files = LoadSave.getLocalFiles();

Callers 1

runMethod · 0.95

Calls 5

fetchBuiltinsMethod · 0.95
doLoadMethod · 0.95
findMethod · 0.80
unwrapFunction · 0.50
populateMethod · 0.45

Tested by

no test coverage detected