MCPcopy
hub / github.com/vercel/hyper / _readFile

Function _readFile

bin/yarn-standalone.js:1492–1502  ·  view source on GitHub ↗
(loc, encoding)

Source from the content-addressed store, hash-verified

1490}
1491
1492function _readFile(loc, encoding) {
1493 return new Promise((resolve, reject) => {
1494 (_fs || _load_fs()).default.readFile(loc, encoding, function (err, content) {
1495 if (err) {
1496 reject(err);
1497 } else {
1498 resolve(content);
1499 }
1500 });
1501 });
1502}
1503
1504function readFile(loc) {
1505 return _readFile(loc, 'utf8').then(normalizeOS);

Callers 2

readFileFunction · 0.85
readFileRawFunction · 0.85

Calls 3

_load_fsFunction · 0.85
rejectFunction · 0.85
resolveFunction · 0.85

Tested by

no test coverage detected