()
| 31 | |
| 32 | const configPath = path.join(homedir, '.crd-leetcode.json') |
| 33 | const getConfig = () => { |
| 34 | try { |
| 35 | const config = JSON.parse(fs.readFileSync(configPath)) |
| 36 | return config |
| 37 | } catch (error) { |
| 38 | return { |
| 39 | country: undefined, |
| 40 | cookies: undefined, |
| 41 | } |
| 42 | } |
| 43 | } |
| 44 | const stringify = data => JSON.stringify(data, null, 2) |
| 45 | |
| 46 | const setConfig = (payload = {}) => { |
no outgoing calls
no test coverage detected