MCPcopy
hub / github.com/NUKnightLab/TimelineJS3 / buildLanguageURL

Function buildLanguageURL

src/js/language/Language.js:242–251  ·  view source on GitHub ↗
(code, script_path)

Source from the content-addressed store, hash-verified

240}
241
242function buildLanguageURL(code, script_path) {
243 if (/\.json$/.test(code)) {
244 var url = code;
245 } else {
246 var fragment = "/locale/" + code + ".json";
247 if (/\/$/.test(script_path)) { fragment = fragment.substr(1); }
248 var url = script_path + fragment;
249 }
250 return url;
251}
252
253function formatNumber(val, mask) {
254 if (mask.match(/%(\.(\d+))?f/)) {

Callers 2

constructorMethod · 0.85
loadLanguageFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected