Skip to content

包管理器安装

在应用目录中安装 Fast.Utils 与 Vue peer,选择一种包管理器并保留对应锁文件。

npm

sh
npm install @fast-china/utils vue

pnpm

sh
pnpm add @fast-china/utils vue

Yarn

sh
yarn add @fast-china/utils vue

已有 Vue 项目可复用满足 ^3.5.11 的版本。使用公开 ESM 根入口,不导入私有 dist 子路径。

第一次调用

ts
import { chunk } from "@fast-china/utils";
const result = chunk([1, 2, 3], 2);
console.log(result); // [[1, 2], [3]]

普通工具函数不需要 app.use()。使用 Storage 或 Web Crypto 前,继续阅读运行环境