Runtime contract
The package-manager entry is pure ESM; the CDN entry is a separately minified IIFE.
ES2022 modern browsers and WebViews.
Vue 3.5.11 or newer through a required peer dependency.
uni-app through guarded, direct
uni.xxxcalls; App-Plus detection checkstypeof plusdirectly.No import-time access to
window, Storage, oruni; unsupported calls fail explicitly.Web Crypto, URL, Intl, TextEncoder, and related platform capabilities are not polyfilled.
Text operations always use the internal UTF-8 implementation independently of TextEncoder / TextDecoder, without installing global polyfills. Invalid UTF-8 still throws TypeError; decoding removes one leading BOM and encoding replaces lone surrogates with U+FFFD.
Artifacts target ES2022 syntax and do not promise Chrome 83 / Safari 12 syntax compatibility. Platform APIs are checked at call time in App, H5, and mini-program runtimes.
No dependency on
Object.hasOwn, array/string.at(), or a requiredglobalThis. Query parameters use nativeencodeURIComponent/decodeURIComponentwithoutURLSearchParams; malformed percent encoding, invalid UTF-8, and lone surrogates during encoding throwURIError.Default byte formatting and default Simplified Chinese relative-time text use internal implementations without Intl. Explicit
localeoptions continue to useIntl.NumberFormatandIntl.RelativeTimeFormat, preserving arbitrary locales and options; missing capabilities throw an explicit Error.truncateGraphemesstill requiresIntl.Segmenterto preserve full grapheme semantics. Web Crypto, DOM, Storage, and clipboard capabilities are checked against the actual runtime.useBreakpointssupports legacyMediaQueryList.addListener/removeListenerand removes listeners with the Vue scope.Error causes use native ErrorOptions. Older runtimes may ignore this diagnostic information; no compatibility implementation is injected.
Cryptographic operations check only the SubtleCrypto methods they require; digests do not require key generation or signing. Algorithm availability remains platform-dependent and failures remain errors;
hasWebCrypto()still checks the complete capability set.
