open-index/open-npm huggingface dataset:
npm package: @jctechstudio/ui
Description: UI component library with Astro, for Astro.
Author: JC Tech Studio
Latest version: 0.1.0

# Astro Starter Kit: Component Package

This is a template for an Astro component library. Use this template for writing components to use in multiple projects
or publish to NPM.

```sh
pnpm create astro@latest -- --template component
```

[![Open in StackBlitz](https://developer.stackblitz.com/img/open_in_stackblitz.svg)](https://stackblitz.com/github/withastro/astro/tree/latest/examples/non-html-pages)
[![Open with CodeSandbox](https://assets.codesandbox.io/github/button-edit-lime.svg)](https://codesandbox.io/p/sandbox/github/withastro/astro/tree/latest/examples/non-html-pages)
[![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/withastro/astro?devcontainer_path=.devcontainer/component/devcontainer.json)

## 🚀 Project Structure

Inside of your Astro project, you'll see the following folders and files:

```text
/
├── index.ts
├── src
│   └── components
│       └── Button
│           ├── Button.astro
├── tsconfig.json
├── package.json
```

The `index.ts` file is the "entry point" for your package. Export your components in `index.ts` to make them importable
from your package.

## 🧞 Commands

All commands are run from the root of the project, from a terminal:

| Command        | Action                                                                                                                                                                                                                            |
|:---------------|:----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `pnpm link`    | Registers this package locally. Run `pnpm link my-component-library` in an Astro project to install your components                                                                                                               |
| `pnpm publish` | [Publishes](https://docs.npmjs.com/creating-and-publishing-unscoped-public-packages#publishing-unscoped-public-packages) this package to NPM. Requires you to be [logged in](https://docs.npmjs.com/cli/v8/commands/pnpm-adduser) |
npm package: @jctrans-plugin/axios-adapter
Description: jctrans fe request axios adapter
Author: zhangxiangyi
Latest version: 1.0.4

# @jctrans-plugin/axios-adapter

## cache Usage

```javascript
import axios from 'axios';
import { cacheHandle } from '@jctrans-plugin/axios-adapter';
const request = axios.create({
	baseURL: '/',
	adapter: cacheHandle(axios.defaults.adapter, {
    maxAge: 5000, // 最大过期时间
  }),
});
// get接口开启接口缓存
request.get('/users', { cache: true });
// 非get接口强制开启接口缓存【!!不建议，缓存post接口容易导致问题】
request.get('/users', { forceCache: true });
```

## throttle Usage

```javascript
import axios from 'axios';
import { throttleHandle } from '@jctrans-plugin/axios-adapter';
const request = axios.create({
	baseURL: '/',
	adapter: throttleHandle(axios.defaults.adapter),
});

```

### 存储算法使用lru-cache 请放心食用[https://www.npmjs.com/package/lru-cache]