(fs, path)
| 164 | } |
| 165 | |
| 166 | function pathTestIsFile(fs, path) { |
| 167 | try { |
| 168 | const stat = fs.statSync(path, {__proto__: null, throwIfNoEntry: false}); |
| 169 | return stat && stat.isFile(); |
| 170 | } catch (e) { |
| 171 | return false; |
| 172 | } |
| 173 | } |
| 174 | |
| 175 | function readFile(fs, path) { |
| 176 | return fs.readFileSync(path, {encoding: 'utf8'}); |
no test coverage detected
searching dependent graphs…