Environments
env
- description:
get current runtime
- returns:
node
: You are in Node.js environment.browser
: You are in browser environment.
ts
import { } from '@vincent-the-gamer/utils'
.() // "node" | "browser"
getCurrentPlatform
- description:
get user's current os type.
- returns: "windows" | "macOS" | "linux" | "mobile"
ts
import { } from '@vincent-the-gamer/utils'
.(()) // "windows" | "macOS" | "linux" | "mobile"