Environment and device
Read the Taro build environment, window dimensions, operating system, browser class, and screen proportions.

Taro helpers for environment detection, navigation, login, scrolling, toasts, page parameters, and device information.
npm install mazey-taro-utils The package delegates platform operations to Taro and keeps application call sites concise.
Read the Taro build environment, window dimensions, operating system, browser class, and screen proportions.
Read the current page and parameters, or construct Taro navigation and redirect URLs from page names and parameters.
Request a login code, show a text toast, and scroll to a page selector through Taro APIs.
Install the package in a Taro project. The package retains @tarojs/taro and mazey as runtime dependencies.
npm install mazey-taro-utilsImport supported helpers from the package root. Navigation pages are directory names below the Taro /pages route.
import {
getEnv,
getWindowSize,
quickNavigateTo,
quickToast,
} from "mazey-taro-utils";
quickToast(`Running in ${getEnv() || "an unspecified Taro environment"}`);
quickNavigateTo("profile", { params: { userId: "42" } });
const { width, height } = getWindowSize();
console.log({ width, height });See the interactive playground for controlled browser demonstrations and the API documentation for the complete public surface.
Installation availability depends on the browser and platform. When this browser supplies an installation prompt, the Install app action below becomes available. Other browsers may expose an equivalent action in their own menus.