# lk-h5-tools

> ``` IItMessage.error(`我是错误消息${index}`); IItMessage.warning(`我是警告消息${index}`); IItMessage.success(`我是成功消息${index}`); IItMessage.info(`我是消息${index}`); ``` ## IIRequest 示例 ``` const baseURL = "https://xxx.com/api/"; const http = new IIRequest(baseUR

Latest version **0.1.5** (published 2023-10-11) · 0 weekly downloads

## Install

```sh
npm install lk-h5-tools
pnpm add lk-h5-tools
yarn add lk-h5-tools
bun add lk-h5-tools
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities.

Warnings: low downloads; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.5 |
| Published | 2023-10-11 |
| First published | 2023-10-10 |
| Weekly downloads | 0 |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 2 |
| Unpacked size | 147.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | LMK |
| Maintainers | itcode2021 |

## Links

- npm: https://www.npmjs.com/package/lk-h5-tools
- npm.io page: https://npm.io/package/lk-h5-tools

## Dependencies (2)

- [axios](https://npm.io/package/axios.md) ^1.5.1
- [jweixin-1.6.0](https://npm.io/package/jweixin-1.6.0.md) ^1.0.0

## Recent versions

- 0.1.5 (latest) — 2023-10-11
- 0.1.4 — 2023-10-10
- 0.1.3 — 2023-10-10
- 0.1.2 — 2023-10-10
- 0.1.1 — 2023-10-10
- 0.1.0 — 2023-10-10

## README

## IIRequest 示例
```
IItMessage.error(`我是错误消息${index}`);
IItMessage.warning(`我是警告消息${index}`);
IItMessage.success(`我是成功消息${index}`);
IItMessage.info(`我是消息${index}`);
```
## IIRequest 示例
```
const baseURL = "https://xxx.com/api/";
const http = new IIRequest(baseURL, 'token', 200)

function testHttp() {
  http.get("/client/c/commodity/banner/list", {}).then((res: any) => {
    console.log("请求获取的数据", res)
    IItMessage.success(`请求获取的数据`);
  }).catch(err => {
    IItMessage.error(err || '请求失败');
  })
}
```
## IITokenStorage 示例
```
IITokenStorage.set("12312321312321");
document.querySelector("#tokenId")!.innerHTML = IITokenStorage.get();
```

## IICache 示例
```
IICache.set("prODSASHJDHA", {name: '匿名', age: '张三'}, false);
IICache.get("prODSASHJDHA", { isParse: true, isDelete: false }, "默认值");
IICache.remove("prODSASHJDHA", false);
```

---
_Source: https://npm.io/package/lk-h5-tools · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
