MCPcopy
hub / github.com/alewin/useWorker / remoteDepsParser

Function remoteDepsParser

packages/useWorker/src/lib/remoteDepsParser.ts:13–18  ·  view source on GitHub ↗
(deps: string[])

Source from the content-addressed store, hash-verified

11 * remoteDepsParser(['http://js.com/1.js', 'http://js.com/2.js']) // return importScripts('http://js.com/1.js, http://js.com/2.js')
12 */
13const remoteDepsParser = (deps: string[]) => {
14 if (deps.length === 0) return ''
15
16 const depsString = (deps.map(dep => `${dep}`)).toString()
17 return `importScripts('${depsString}')`
18}
19
20export default remoteDepsParser

Callers 1

createWorkerBlobUrlFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected