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

Method mergeData

src/js/language/Language.js:45–55  ·  view source on GitHub ↗

* Reimplement Util.mergeData to handle nested dictionaries * @param {object} lang_json

(lang_json)

Source from the content-addressed store, hash-verified

43 * @param {object} lang_json
44 */
45 mergeData(lang_json) {
46 for (k in LANGUAGES.en) {
47 if (lang_json[k]) {
48 if (typeof(this[k]) == 'object') {
49 mergeData(lang_json[k], this[k]);
50 } else {
51 this[k] = lang_json[k]; // strings, mostly
52 }
53 }
54 }
55 }
56
57 formatBigYear(bigyear, format_name) {
58 var the_year = bigyear.year;

Callers

nothing calls this directly

Calls 1

mergeDataFunction · 0.90

Tested by

no test coverage detected