MCPcopy Create free account
hub / github.com/thinkjs/thinkjs / touchConfig

Function touchConfig

test/lib/utils.js:18–27  ·  view source on GitHub ↗
(config = {}, cb)

Source from the content-addressed store, hash-verified

16}
17
18function touchConfig(config = {}, cb) {
19 let json = JSON.stringify(config,function(key, val) {
20 if (typeof val === 'function') {
21 return val + ''; // implicitly `toString` it
22 }
23 return val;
24 })
25 let content = `module.exports = ${json}`;
26 createFile(CONFIG_PATH, 'config.js', content);
27}
28
29const sleep = time => new Promise(resolve => setTimeout(resolve, time));
30

Callers

nothing calls this directly

Calls 1

createFileFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…