MCPcopy
hub / github.com/acode/cli / write

Method write

cli/config.js:91–100  ·  view source on GitHub ↗
(data)

Source from the content-addressed store, hash-verified

89 }
90
91 write (data) {
92 this.data = data = data || this.data;
93 fs.writeFileSync(
94 this.fullpath(),
95 Object.keys(data)
96 .map(key => `${key}=${data[key]}`)
97 .join('\n') + '\n'
98 );
99 return data;
100 }
101
102 get (key, defaultValue) {
103 return key in this.data ? this.data[key] : defaultValue;

Callers 6

loadMethod · 0.95
initializeMethod · 0.95
saveMethod · 0.95
parser.jsFile · 0.80
runMethod · 0.80
setAccessTokenMethod · 0.80

Calls 1

fullpathMethod · 0.95

Tested by

no test coverage detected