@plaoc/is-dweb
@plaoc/is-dweb is a simple helper library for the dweb-browser environment.
Installation
bash
pnpm add -g @plaoc/is-dwebbash
yarn global add @plaoc/is-dwebbash
npm i -g @plaoc/is-dwebMethod
isDweb
Used to determine if it is a dweb environment.
ts
import { isDweb } from "@plaoc/is-dweb";
console.log("isdweb=>", isDweb());dwebTarget
This function is used to determine the major version of dwebTarget. Current major version upgrades may cause some breaking changes, which can be restricted using this function.
ts
import { dwebTarget } from "@plaoc/is-dweb";
console.log("dwebTarget=>", dwebTarget());isMobile
Determine if it is a mobile device.
ts
import { isMobile } from "@plaoc/is-dweb";
console.log("isMobile=>", isMobile());