open-index/open-npm huggingface dataset:
npm package: @liuhanqu/observer
Description: Observer based on IntersectObserver
Author: liuhanqu
Latest version: 1.0.0

Observer based on IntersectObserver

```js
import Observer from '@liuhanqu/observer';

// 适用于懒加载图片或者iframe
let ob1 = new Observer('.lazy', {});

ob1.serve();

// 适用于底部加载更多
let ob2 = new Observer('.j-more', {
  onIntersect() {
    // fetch data
  },
  unobserverAfterIntersect: false,
  isLazy: false,
});

ob2.serve();
```
npm package: @liuhanqu/request
Description: Request based on Fetch API
Author: liuhanqu
Latest version: 1.0.2

Request based on Fetch API

## Install

```
npm i @liuhanqu@request
```

## Usage

```js
import rf from '@liuhanqu/request';

async () => {
  const res = await rf.get('/some-api', {params: {foo: 'bar'}}).text();

  console.log(res);
};

async () => {
  const res = await rf.post('/some-api', {json: {foo: 'bar'}}).json();

  console.log(res);
};
```

## API

- rf(url: string, option: Option)

- rf.get(url, option)

- rf.post(url, option)

- rf.put(url, option)

- rf.delete(url, option)

- rf.patch(url, option)

```ts
interface Option {
  params?: Record<string, string>;
  json?: object;
  timeout?: number;

  method?: string;
  keepalive?: boolean;
  ...
  (same with fetch params)
}
```

## Differ with fetch

- request timeout, it will throw an TimeoutError

- response is not ok, it will throw an HTTPError

- auto add query to url when pass params

- auto set header when pass json
npm package: @liuheo/utils
Description: 前端工具库
Author: LiuHeo
Latest version: 0.0.9

<br>
<p align="center">
@liuheo/utils   
<br />
常用的前端工具函数
</p>

<p align="center">
<a href="https://www.npmjs.com/package/@liuheo/utils" target="__blank"><img src="https://img.shields.io/npm/v/@liuheo/utils?color=a1b858&label=" alt="NPM version"></a>
<a href="https://www.npmjs.com/package/@liuheo/utils" target="__blank"><img alt="NPM Downloads" src="https://img.shields.io/npm/dm/@liuheo/utils?color=50a36f&label="></a>
</p>

## 📦 安装

```bash
# npm
npm install @liuheo/utils

# or pnpm
pnpm add @liuheo/utils

# or yarn
yarn add @liuheo/utils

```
npm package: @liuheo/vueuse
Description: vue工具库
Author: LiuHeo
Latest version: 0.0.13

<br>
<p align="center">
@liuheo/vueuse   
<br />
常用的vue工具函数
</p>

<p align="center">
<a href="https://www.npmjs.com/package/@liuheo/vueuse" target="__blank"><img src="https://img.shields.io/npm/v/@liuheo/vueuse?color=a1b858&label=" alt="NPM version"></a>
<a href="https://www.npmjs.com/package/@liuheo/vueuse" target="__blank"><img alt="NPM Downloads" src="https://img.shields.io/npm/dm/@liuheo/vueuse?color=50a36f&label="></a>
</p>

## 📦 安装

```bash
# npm
npm install @liuheo/vueuse

# or pnpm
pnpm add @liuheo/vueuse

# or yarn
yarn add @liuheo/vueuse

```