MCPcopy Create free account
hub / github.com/ptmt/react-native-macos / read

Method read

packager/src/node-haste/Module.js:327–335  ·  view source on GitHub ↗

* Shorthand for reading both from cache or from fresh for all call sites that * are asynchronous by default.

(transformOptions: TransformOptions)

Source from the content-addressed store, hash-verified

325 * are asynchronous by default.
326 */
327 read(transformOptions: TransformOptions): Promise<ReadResult> {
328 return Promise.resolve().then(() => {
329 const cached = this.readCached(transformOptions);
330 if (cached.result != null) {
331 return cached.result;
332 }
333 return this.readFresh(transformOptions);
334 });
335 }
336
337 /**
338 * Same as `readFresh`, but reads from the cache instead of transforming

Callers 5

getCodeMethod · 0.95
getMapMethod · 0.95
getDependenciesMethod · 0.95
Module-test.jsFile · 0.45
_toModuleTransportMethod · 0.45

Calls 4

readCachedMethod · 0.95
readFreshMethod · 0.95
resolveMethod · 0.65
thenMethod · 0.45

Tested by

no test coverage detected