Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
clearTimeout(timeout)
timeout = setTimeout(_ => done({ errorCode: 504 }), LOAD_TIMEOUT)
}
}
else if (seenLoading) done()
}
const historyDriver = goto$ => {
O.from(goto$).subscribe(loc =>
done({ redirect: loc.pathname + (loc.search || '') })
)
return O.of({ pathname, search: '?'+args, body })
}
const dispose = run(main, {
DOM: makeHTMLDriver(htmlUpdate, { modules: ModulesForHTML })
, HTTP: makeHTTPDriver()
, route: makeRouteDriver(historyDriver)
, storage: _ => ({ local: { getItem: key => O.of(locals[key]) } })
, scanner: _ => O.empty()
, search: makeSearchDriver(apiBase)
, state: state$ => O.from(state$).subscribe(stateUpdate)
})
}