(filePath)
| 2 | const fs = require('fs'); |
| 3 | |
| 4 | function ensureDirectoryPath (filePath) { |
| 5 | const dirname = path.dirname(filePath); |
| 6 | if (fs.existsSync(dirname)) { |
| 7 | return true; |
| 8 | } |
| 9 | ensureDirectoryPath(dirname); |
| 10 | fs.mkdirSync(dirname); |
| 11 | } |
| 12 | |
| 13 | module.exports = function (path) { |
| 14 | return ensureDirectoryPath(path); |
no outgoing calls
no test coverage detected