Skip to content

inBrowser ​

判断代码是否在 浏览器环境 中运行。

使用 ​

ts
import { inBrowser } from 'rattail'

inBrowser() // 在浏览器中返回 true

返回值 ​

类型
boolean