MCPcopy Create free account
hub / github.com/FSGModding/FSG_Mod_Assistant / getSafeNote

Method getSafeNote

lib/modCheckLib.js:1153–1157  ·  view source on GitHub ↗

* Get note with safe default * @param {modRecord_collectKey} collectKey * @param {string} noteKey * @returns {any}

(collectKey, noteKey)

Source from the content-addressed store, hash-verified

1151 * @returns {any}
1152 */
1153 getSafeNote(collectKey, noteKey) {
1154 const fullNoteKey = `notes_${noteKey}`
1155 const realDefault = this.#noteDefaults[fullNoteKey]
1156 return this.#map_CollectionNotes.get(`${collectKey}.${fullNoteKey}`, realDefault)
1157 }
1158 getSafeDate(collectKey, noteKey) {
1159 const safeDate = this.getSafeNote(collectKey, noteKey)
1160 return typeof safeDate === 'object' ? safeDate.toISOString() : safeDate

Callers 2

getSafeDateMethod · 0.95

Calls 1

getMethod · 0.45

Tested by

no test coverage detected