Download src/lib/isomorphic/index.ts from Specver/bingo: direct link, hf CLI and curl.
- Browser
- Download file 476 Bytes
-
https://huggingface.co/spaces/Specver/bingo/resolve/main/src/lib/isomorphic/index.ts
- Command line
-
hf download hf://spaces/Specver/bingo/src/lib/isomorphic/index.ts
-
curl -L -o index.ts https://huggingface.co/spaces/Specver/bingo/resolve/main/src/lib/isomorphic/index.ts
476 Bytes
| 'use client' | |
| import Default from './browser' | |
| let exportsModel: any = {} | |
| if (process.browser) { | |
| Object.assign(exportsModel, require('./browser').default) | |
| } else { | |
| Object.assign(exportsModel, require('./node').default) | |
| } | |
| export default exportsModel! as typeof Default | |
| export const fetch: typeof Default.fetch = exportsModel!.fetch | |
| export const WebSocket: typeof Default.WebSocket = exportsModel!.WebSocket | |
| export const debug: typeof Default.debug = exportsModel!.debug | |