(data)
| 18 | |
| 19 | // Function to write data to JSON file |
| 20 | function writeDataToFile(data) { |
| 21 | try { |
| 22 | fs.writeFileSync(dataFilePath, JSON.stringify(data, null, 2), 'utf-8'); |
| 23 | } catch (error) { |
| 24 | console.error('Error writing data to file:', error); |
| 25 | } |
| 26 | } |
| 27 | |
| 28 | // Function to create initial structure if file does not exist |
| 29 | function initializeDataFile() { |
no outgoing calls
no test coverage detected