MCPcopy
hub / github.com/csscomb/csscomb.js / _readFile

Method _readFile

src/core.js:407–416  ·  view source on GitHub ↗
(path)

Source from the content-addressed store, hash-verified

405 }
406
407 _readFile(path) {
408 return new Promise((resolve, reject) => {
409 if (!this._shouldProcessFile(path)) reject();
410
411 fs.readFile(path, 'utf8', function(e, string) {
412 if (e) reject();
413 resolve(string);
414 });
415 });
416 }
417
418 /**
419 * Checks if path is not present in `exclude` list.

Callers 1

lintFileMethod · 0.95

Calls 2

_shouldProcessFileMethod · 0.95
readFileMethod · 0.45

Tested by

no test coverage detected