MCPcopy Create free account
hub / github.com/cyclejs/cyclejs / isolateAllSources

Function isolateAllSources

isolate/src/index.ts:26–39  ·  view source on GitHub ↗
(sources: So, scope: string)

Source from the content-addressed store, hash-verified

24}
25
26function isolateAllSources<So extends Sources>(sources: So, scope: string): So {
27 const scopedSources = {} as So;
28 for (const key in sources) {
29 const source = sources[key] as Partial<IsolateableSource>;
30 if (sources.hasOwnProperty(key)
31 && source
32 && typeof source.isolateSource === 'function') {
33 scopedSources[key] = source.isolateSource(source, scope);
34 } else if (sources.hasOwnProperty(key)) {
35 scopedSources[key] = sources[key];
36 }
37 }
38 return scopedSources;
39}
40
41function isolateAllSinks<So extends Sources, Si>(sources: So, sinks: Si, scope: string): Si {
42 const scopedSinks = {} as Si;

Callers 1

isolateFunction · 0.85

Calls 1

isolateSourceMethod · 0.65

Tested by

no test coverage detected