open-index/open-npm huggingface dataset:
npm package: @panhezeng/vue-axios
Description: A Vue plugin
Author: 潘何增
Latest version: 2.0.5

# vue-axios

## 示例

[点击预览](https://panhezeng.github.io/vue-axios/)

示例代码目录 /example

示例使用的 apiary mock 服务每次 Request 获得的 Response 都是不变的。免费服务可能会出现无响应等错误

## 说明

方便使用 vue-resource 的老用户，和 vue-resource 一样，把 axios 类挂载到了 http 属性名上，同时创建 axios 属性，和 http 属性引用地址一样。
本组件使用的 axios 是 latest 版本，没有太复杂的东西，放心使用，如果有需求，可以 fork 修改。
修改了 output 方式，通过 require 或 window 方式使用，不需要加.default

## 用法

### internal vue 方式

`npm i vue @panhezeng/vue-axios -S`

```javascript
import Vue from "vue";
import VueAxios from "@panhezeng/vue-axios";
Vue.use(VueAxios); ̰
```

### external vue 方式

```html
<script src="https://cdn.jsdelivr.net/npm/vue@latest/dist/vue.min.js"></script>
```

`npm i @panhezeng/vue-axios -S`

```javascript
// auto install
import "@panhezeng/vue-axios";
```

or

```html
<!--auto install-->
<script src="https://cdn.jsdelivr.net/npm/axios@latest/dist/axios.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/@panhezeng/vue-axios@latest/dist/vue-axios.min.js"></script>
```

```javascript
console.log(Vue.http);
console.log(Vue.axios);
```

```vue
<script>
export default {
  name: "App",
  created() {
    this.$http
      .get("https://easy-mock.com/mock/5ad718dc7b068762cd35aeaf/api/test")
      .then(function(response) {
        console.log(response);
      })
      .catch(function(error) {
        console.log(error);
      });
    console.log(this.$axios);
  }
};
</script>
```

## 编译

```bash
# install dependencies
npm install

# 运行插件使用示例
npm run dev:example

# 编译插件
npm run build

# 发版
npm set registry https://registry.npmjs.org/ && npm set @panhezeng:registry https://registry.npmjs.org/ && npm version patch && npm publish --access public && npm set registry https://registry.npm.taobao.org/ && npm set @panhezeng:registry https://registry.npm.taobao.org/

```
npm package: @panhezeng/vue-event-hub
Description: A Vue plugin
Author: 潘何增
Latest version: 2.0.10

# vue-event-hub

## 示例

[点击预览](https://panhezeng.github.io/vue-event-hub/)

示例代码目录 /example

## 说明

    一个全局挂载的vue实例，可以全局访问，分两个版本，默认版本是纯事件hub版本，另一个是带数据管理功能的版本
    覆写的API为以下：
    on
    off
    watch

    扩展API
    setData
    getData
    delData


    因为VueEventHub是全项目共用vue实例，所以覆写了on off实例方法，并提供了setData getData delData实例方法，这些方法对事件和数据操作进行了检查校验，并提供了相应的提示。
    因为hot热更新也会触发这个插件实例方法的错误警告提示，为了不影响hot更新调试，使用console.warn，而没有使用throw。
    本组件没有太复杂的东西，放心使用，如果有需求，可以fork修改。
    修改了output方式，通过require或window方式使用，不需要加.default
    /**
     * @param event 如果值为假，则清除所有eventHub的所有事件
     * @param callback 如果值为假，则清除event参数的对应事件的所有监听函数
     */
    function off (event, callback)

## 用法

### internal vue 方式

`npm i vue @panhezeng/vue-event-hub -S`

#### 默认不带数据管理功能的纯事件 hub，可以搭配 vuex 使用

```javascript
import Vue from "vue";
import VueEventHub from "@panhezeng/vue-event-hub";
Vue.use(VueEventHub);
```

#### 带数据管理功能的事件 hub, 极简版 vuex

```javascript
import Vue from "vue";
import VueEventHub from "@panhezeng/vue-event-hub/dist/vue-event-hub-store.min.js";
Vue.use(VueEventHub);
```

### external vue 方式

```html
<script src="https://cdn.jsdelivr.net/npm/vue@latest/dist/vue.min.js"></script>
```

`npm i @panhezeng/vue-event-hub -S`

```javascript
// auto install
import "@panhezeng/vue-event-hub";
```

or

```html
<!--auto install-->
<script src="https://cdn.jsdelivr.net/npm/@panhezeng/vue-event-hub@latest/dist/vue-event-hub.min.js"></script>
```

```javascript
console.log(Vue.eventHub);
```

#### 事件名和数据属性名，建议单独写一个静态类，这样管理使用方便，比如下面例子中的 AppSetUser 和 user

```vue
<script>
const Event = {
  AppSetUser: "AppSetUser"
};
export default {
  name: "App",
  data() {
    return {
      user: []
    };
  },
  created() {
    this.$eventHub.watch("user", (newVal, oldVal) => {
      console.log(this.$eventHub.getData("user"), newVal, oldVal);
      this.user.push(
        newVal ? JSON.stringify(this.$eventHub.getData("user")) : "undefined"
      );
    });
    this.$eventHub.on(Event.AppSetUser, this.setUser);
    this.$eventHub.emit(Event.AppSetUser, { name: "phz1" });
    setTimeout(() => {
      this.$eventHub.delData("user");
      // 这个事件已经监听不到了，因为setUser后off了
      this.$eventHub.emit(Event.AppSetUser, { name: "phz2" });
    }, 600);
  },
  methods: {
    setUser(data) {
      this.$eventHub.setData("user", data, true);
      this.$eventHub.off(Event.AppSetUser, this.setUser);
    }
  }
};
</script>
```

## 编译

```bash
# install dependencies
npm install

# 运行插件使用示例
npm run dev:example

# 编译插件
npm run build

# 发版
npm set registry https://registry.npmjs.org/ && npm set @panhezeng:registry https://registry.npmjs.org/ && npm version patch && npm publish --access public && npm set registry https://registry.npm.taobao.org/ && npm set @panhezeng:registry https://registry.npm.taobao.org/

```
npm package: @paniniswap/paniniswap-sdk
Description: 🛠 An SDK for building applications on top of paniniswap.
Latest version: 0.1.1

# PaniniSwap SDK

## Running tests

To run the tests, follow these steps. You must have at least node v10 and [yarn](https://yarnpkg.com/) installed.

First clone the repository:

```sh
git clone https://github.com/paniniswap/paniniswap-sdk.git
```

Move into the paniniswap-sdk working directory

```sh
cd paniniswap-sdk/
```

Install dependencies

```sh
yarn install
```

Run tests

```sh
yarn test
```

You should see output like the following:

```sh
yarn run v1.22.4
$ tsdx test
 PASS  test/constants.test.ts
 PASS  test/pair.test.ts
 PASS  test/fraction.test.ts
 PASS  test/miscellaneous.test.ts
 PASS  test/entities.test.ts
 PASS  test/trade.test.ts

Test Suites: 1 skipped, 6 passed, 6 of 7 total
Tests:       3 skipped, 82 passed, 85 total
Snapshots:   0 total
Time:        5.091s
Ran all test suites.
✨  Done in 6.61s.
```
npm package: @paniniswap/paniniswap-uikit
Description: Set of UI components for panini projects
Latest version: 0.1.5

# Panini UIkit

Panini UIkit is a set of React components and hooks used to build pages on Panini's apps. It also contains a theme file for dark and light mode.

## Install

`yarn add @paniniswap/paniniswap-uikit`

## Setup

### Theme

Before using Panini UIkit, you need to provide the theme file to styled-component.

```
import { ThemeProvider } from 'styled-components'
import { light, dark } from '@paniniswap/paniniswap-uikit'
...
<ThemeProvider theme={isDark}>...</ThemeProvider>
```

### Reset

A reset CSS is available as a global styled component.

```
import { ResetCSS } from '@paniniswap/paniniswap-uikit'
...
<ResetCSS />
```

### Types

This project is built with Typescript and export all the relevant types.
npm package: @pankaj-refyne/eslint-plugin
Description: Refyne recommended custom eslint plugin
Author: Refyne
Latest version: 0.1.0

# Refyne ESLint Plugin

The repository includes custom ESLint rules, written in TypeScript, designed to serve as guardrails. These rules help prevent errors and avoid mistakes when working with NestJS and Mongoose.

---

**File Structure**:

-   `docs/rules/` for documentation.
-   `src/rules/` for rule definitions.
-   `tests/` for tests for `src/`.

---

## Installation

Use [npm](https://www.npmjs.com/) or a compatibility tool to install.

```
$ npm install --save-dev @refyne/eslint-plugin
```

### Requirements

-   Node.js v18.10.0
-   ESLint

## Usage

Modify your `.eslintrc.js`

```js
{
  plugins: ['@refyne'],
  extends: [
    'plugin:@refyne/recommended',
  ]
}
```

See also [Configuring ESLint](https://eslint.org/docs/user-guide/configuring).

## Rules

💼 Set in the `recommended` configuration.\
🔧
Automatically fixable by the
[`--fix` CLI option](https://eslint.org/docs/user-guide/command-line-interface#--fix).\
💡
Manually fixable by
[editor suggestions](https://eslint.org/docs/latest/use/core-concepts#rule-suggestions).

| Name                                                                                           | Description                                                   | 💼  | 🔧  | 💡  |
| :--------------------------------------------------------------------------------------------- | :------------------------------------------------------------ | :-- | :-- | :-- |
| [inconsistent-mongoose-type-declaration](docs/rules/inconsistent-mongoose-type-declaration.md) | Detects inconsistent mongoose types in schema                 | ✅  |     | 💡  |
| incorrect-mongoose-index-field-name                                                            | Flags incorrect mongoose index creation on non-existing field | ✅  |     |     |
| inappropriate-model-injection                                                                  | Restricts model injection in certain files                    | ✅  |     |     |
| incorrect-type-annotation-for-injection-model                                                  | Flags incorrect injection model type in constructor           | ✅  |     | 💡  |
| incorrect-forward-ref-decorator-usage                                                          | Flags incorrect usage of forwardRef decorator in constructor  | ✅  |     | 💡  |

### Development Tools

-   `npm test` runs tests.