MCPcopy Create free account
hub / github.com/Maccoder3/MAC-MD / _load

Method _load

lib/database.js:52–59  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

50 }
51
52 _load() {
53 try {
54 return (this._data = existsSync(this.file) ? JSON.parse(readFileSync(this.file)) : {})
55 } catch (e) {
56 this.logger.error(e)
57 return (this._data = {})
58 }
59 }
60
61 async _save() {
62 let dirname = _dirname(this.file)

Callers 1

constructorMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected