跳到正文

Fast.Utils API ​

本页只用于定位公开入口与模块,不重复维护安装流程、配置教程和完整行为表。 首次接入阅读使用指南,完整成员与类型见导出清单。

导入 ​

全部 API 从 @fast-china/utils 根入口具名导入;类型使用 import type。不依赖内部源码或 dist 子路径。

Storage ​

Local、Session、configureStorage、base64StorageCodec

签名、参数、返回与示例

Identity ​

installationIdentity、configureInstallationIdentity、getOrCreateInstallationId

签名、参数、返回与示例

Logger ​

Logger、logger、configureLogger、createLogger

签名、参数、返回与示例

Base64 ​

DecodedText、decodeBase64、decodeBase64Url、decodeLatin1Base64、decodeSecureBase64、encodeSecureBase64

签名、参数、返回与示例

Crypto ​

GenerateRandomBytes、FixedTimeEquals、MD5Encrypt、SHA1Encrypt、SHA256Bytes、SHA256Encrypt、SHA384Bytes、SHA384Encrypt、SHA512Bytes、SHA512Encrypt、HMACSHA256Encrypt、HMACSHA384Encrypt、HMACSHA512Encrypt、PBKDF2SHA256、HashPasswordPBKDF2SHA256、VerifyPasswordPBKDF2SHA256、HKDFSHA256、AESEncrypt、AESDecrypt、AESEncryptAuthenticated、AESDecryptAuthenticated、AESEncryptWithPassword、AESDecryptWithPassword、GenerateRSAKeyPair、RSAEncryptOAEP、RSADecryptOAEP、RSASignPSS、RSAVerifyPSS、GenerateECDSAKeyPair、ECDSASign、ECDSAVerify、GenerateECDHKeyPair、DeriveECDHSecret、DeriveECDHKeySHA256

签名、参数、返回与示例

Array ​

chunk, removeNullishValues, unique, uniqueBy, groupBy, partition, difference, intersection, symmetricDifference, hasDuplicatesBy, allEqualBy

签名、参数、返回与示例

Async ​

sleep、withTimeout、retry、mapConcurrent、debounce、throttle

签名、参数、返回与示例

Number ​

formatBytes、randomInt

签名、参数、返回与示例

Function ​

once

签名、参数、返回与示例

String ​

copy、generateUuidV4、randomString

签名、参数、返回与示例

Vue ​

useBreakpoints、useElementSize、useEventListener、useNow、useResizeObserver、useTransition、useWindowSize

签名、参数、返回与示例

模块 ​

其他模块:Color、Date、DOM、Environment、Object。

剪贴板 ​

copy 的任务流程见复制文本,准确合同见 String API。

安全与限制 ​

运行时契约说明平台和包入口边界;密码学指南说明算法选择。 Base64、SecureBase64 和 Storage 的 crypto 编码不是加密;安装标识不是认证凭证。

错误与兼容性 ​

单个 API 的非法输入、空值、异常与取消合同以对应详情为准;兼容范围见运行时契约。