# odin-node-util **Repository Path**: odinsam/odin-node-util ## Basic Information - **Project Name**: odin-node-util - **Description**: odin-node-plugs - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2025-02-20 - **Last Updated**: 2025-03-26 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # odin-node-util #### 介绍 odin-node-plugs #### 软件架构 软件架构说明 #### 安装教程 1. npm add odin-node-util #### 使用说明 1. axios 使用 ```ts axios使用 // 定义 httpClientConfig 配置 const axiosConfig: HttpClientConfig = { baseURL: "https://odinsam.usemock.com/", timeout: 1000, }; // 定义 axiosHelper 对象 const axiosHelper = new odinAxios(axiosConfig); // 定义项目使用的方法 function getUser() { return axiosHelper.get("/user"); } // 具体调用 interface IUser { user: string; } getUser().then((res) => { console.log("res1", res.data.user); }); ``` 2. 文件相关扩展方法 ```ts 下载文件 FileUtil.downloadFile(res.data, "文件名.扩炸名"); ``` 3. 字符串扩展 ```ts md5加密 let str = StringUtil.toMd5("abcs"); ``` #### 参与贡献 0. 1. nrm use npm 2. npm login 3. 修改版本号 4. npm publish 5. nrm use taobao