Skip to content

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.xxx calls; App-Plus detection checks typeof plus directly.

  • No import-time access to window, Storage, or uni; 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 required globalThis. Query parameters use native encodeURIComponent / decodeURIComponent without URLSearchParams; malformed percent encoding, invalid UTF-8, and lone surrogates during encoding throw URIError.

  • Default byte formatting and default Simplified Chinese relative-time text use internal implementations without Intl. Explicit locale options continue to use Intl.NumberFormat and Intl.RelativeTimeFormat, preserving arbitrary locales and options; missing capabilities throw an explicit Error. truncateGraphemes still requires Intl.Segmenter to preserve full grapheme semantics. Web Crypto, DOM, Storage, and clipboard capabilities are checked against the actual runtime.

  • useBreakpoints supports legacy MediaQueryList.addListener/removeListener and 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.