UNPKG

@scalar/oas-utils

Version:

Open API spec and Yaml handling utilities

8 lines (6 loc) 272 B
const defaultStateFactory = () => ({}); /** * This allows us to access the server state in the front-end */ const ssrState = typeof window !== 'undefined' ? (window.__SCALAR__ ?? defaultStateFactory()) : defaultStateFactory(); export { defaultStateFactory, ssrState };