MCPcopy Create free account
hub / github.com/adaptlearning/adapt_framework / getLanguage

Method getLanguage

grunt/helpers/Data.js:99–107  ·  view source on GitHub ↗

* Fetch a Language instance by name. * @param {string} name * @returns {Language}

(name)

Source from the content-addressed store, hash-verified

97 * @returns {Language}
98 */
99 getLanguage(name) {
100 const language = this.languages.find(language => language.name === name);
101 if (!language) {
102 const err = new Error(`Cannot find language '${name}'.`);
103 err.number = 10004;
104 throw err;
105 }
106 return language;
107 }
108
109 /**
110 * Returns a JSONFileItem representing the course/config.json file object.

Callers 4

copyLanguageMethod · 0.95
exportMethod · 0.80
importMethod · 0.80
generatePatternsFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected