open-index/open-npm huggingface dataset:
npm package: @sunfishswap/sdk
Description: 🛠 An SDK for building applications on top of Pancakeswap.
Latest version: 3.0.0

# Pancakeswap SDK

Forked from the [Uniswap SDK](https://github.com/Uniswap/uniswap-v2-sdk/commit/a88048e9c4198a5bdaea00883ca00c8c8e582605).

You can refer to the Uniswap SDK documentation [uniswap.org](https://docs.uniswap.org/sdk/2.0.0/).

## 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/pancakeswap/pancake-swap-sdk.git
```

Move into the pancakeswap-sdk working directory

```sh
cd pancakeswap-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: @sunfy/authorized
Description: react权限校验组件
Author: sunfy
Latest version: 1.0.0

# 权限组件，通过比对现有权限与准入权限，决定相关元素的展示

### API

#### 参数类型

```ts
/**
 * @param { string | array | Promise | Function } authority 权限判定
 * @param { string | string[]} currentAuthority 当前权限
 * @param { ReactNode } target 通过组件
 * @param { ReactNode } Exception 未通过组件
 * /
```

### renderPermission

```ts
  renderPermissions: (authority: Authority, currentAuthority: CurrentAuthority, target: ReactNode, Exception: ReactNode) => string | number | boolean | Iterable<ReactNode> | JSX.Element | null | undefined
```

### renderAuthorize

### Props
  
```ts
  currentAuthority: string | string[]
```

### 使用方式一

```tsx
import { renderPermission } from '@sunfy/authorized'

function App(){

  const permissionA = renderPermission(['admin'], ['admin'], 'ok', 'error')
  const permissionB = renderPermission(['admin','user'], 'user', 'ok', 'error')

  return (
    <>
      {permissionA}
      {permissionB}
    </>
  )
}

```

### 使用方式二

```tsx
import renderAuthorize from '@sunfy/authorized'

const Admin = renderAuthorize('admin')
const User = renderAuthorize('user')

function App(){
  return (
    <>
      <Admin authority={'admin'} noMatch={<>Error</>}>
        I am admin
      </Admin>
      <User authority={'user'} noMatch={<>Error</>}>
        I am user
      </User>
    </>
  )
}


```
npm package: @sung-yeop/codemirror-essentials-react
Description: React wrapper for CodeMirror 6
Author: sung-yeop
Latest version: 0.0.9

# @sung-yeop/codemirror-essentials-react

Essential CodeMirror 6 extensions for React applications.

## Installation

```bash
# pnpm
pnpm add @sung-yeop/codemirror-essentials-react

# npm
npm install @sung-yeop/codemirror-essentials-react

# yarn
yarn add @sung-yeop/codemirror-essentials-react
```

## Peer Dependencies

This package requires:
- `react` >= 16.8.0
- `react-dom` >= 16.8.0

## Features

### `useCmeLineWidget`

A React hook for adding custom widgets to specific lines in CodeMirror editor.

```tsx
import { useCmeLineWidget } from '@sung-yeop/codemirror-essentials-react';

function MyEditor() {
  const lineWidgetExtension = useCmeLineWidget({
    // Your line widget configuration
  });

  return (
    <CodeMirror
      extensions={[lineWidgetExtension]}
      // ... other props
    />
  );
}
```

### `useCmeInjectClassName`

A React hook for injecting custom class names into CodeMirror editor elements.

```tsx
import { useCmeInjectClassName } from '@sung-yeop/codemirror-essentials-react';
import type { InjectEffectType } from '@sung-yeop/codemirror-essentials-react';

function MyEditor() {
  const injectClassExtension = useCmeInjectClassName({
    // Your class injection configuration
  });

  return (
    <CodeMirror
      extensions={[injectClassExtension]}
      // ... other props
    />
  );
}
```

## API

### Exports

- `useCmeLineWidget` - Hook for line widget functionality
- `useCmeInjectClassName` - Hook for class name injection
- `InjectEffectType` - TypeScript type for injection effects

## License

MIT © [sung-yeop](https://github.com/sung-yeop)

## Repository

[https://github.com/risorius-devteam/codemirror-essentials](https://github.com/risorius-devteam/codemirror-essentials)

## Issues

Found a bug? Please [create an issue](https://github.com/risorius-devteam/codemirror-essentials/issues).
npm package: @sung-yeop/custom-logger
Description: Custom development logger utility for TypeScript/JavaScript projects
Author: Your Name
Latest version: 1.0.7

# Custom Logger

A lightweight development logging utility for TypeScript/JavaScript projects.

## Features

- Development-only logging (automatically disabled in production)
- Automatic caller file location detection
- Level-based logging (INFO, WARN, ERROR)
- TypeScript support
- Easy to integrate

## Installation

```bash
npm install @sung-yeop/custom-logger
```

## Usage

```typescript
import { Logger } from "@sung-yeop/custom-logger";

// Basic usage (defaults to INFO level)
Logger.log("Hello World");

// With log levels
Logger.log("Information message", "INFO");
Logger.log("Warning message", "WARN");
Logger.log("Error message", "ERROR");
```

## Log Levels

- `INFO`: General information (uses console.log)
- `WARN`: Warning messages (uses console.warn)
- `ERROR`: Error messages (uses console.error)

## Environment

Logging is automatically disabled when `NODE_ENV !== "development"`. This ensures no logs appear in production builds.

## Output Format

```
==============================
1. 파일 위치: util/Logger.util.ts
------------------------------
2. Message : Your message here
------------------------------
3. TimeStamp : 2025-07-21T14:02:26.035Z
==============================
```

## TypeScript Support

```typescript
import { Logger, LogLevelType } from "@sung-yeop/custom-logger";

const level: LogLevelType = "INFO";
Logger.log("TypeScript message", level);
```

## License

MIT
npm package: @sung/subsequence
Description: An NPM package for checking if an array is a [subsequence](https://en.wikipedia.org/wiki/Subsequence) of another array.
Author: Sung M. Kim
Latest version: 0.0.2-alpha.1

# Subsequence

An NPM package for checking if an array is a [subsequence](https://en.wikipedia.org/wiki/Subsequence) of another array.

# Usage

```js
const subsequence = require('@dance2die/subsequence');

const input = [5, 1, 22, 25, 6, -1, 8, 10];
const sequence = [1, 6, -1, 10];

const isSubsequence = subsequence.validate(sequence, input)
console.info(isSubsequence);
// prints "true"

// You can validate a Common Subsequence of X and Y
// https://en.wikipedia.org/wiki/Subsequence#Common_subsequence
const x = ['a', 'c', 'b', 'd', 'e', 'g', 'c', 'e', 'd', 'b', 'g'];
const y = ['b', 'e', 'g', 'c', 'f', 'e', 'u', 'b', 'k'];
const z = ['b', 'e', 'e' ]

const isCommonSubsequence = subsequence.validate(z, x, y)
```
npm package: @sungaoxiang/sso-mock-login
Description: 单点模拟登录
Author: 791300332@qq.com
Latest version: 1.1.15

# sso-mock-login项目

模拟单点登录模块（Single Sign On），单点登录简单说就是在一个多系统共存的环境下，用户在一处登录后，就不用在其他系统中登录。 

我们一般在请求接口时会去请求接口服务器，而接口服务器则会去验证cookie。

若验证失败，则接口服务器会重定向到单点登录服务器（sso服务器）。

如：我们去访问接口服务器（http://api.com）时会被重定向到sso服务器（https://sso-server.com/login?service=http://api.com/cas&goto=http%3A%2F%2Fapi.com%2Findex）

这一串地址中：
  - sso服务器地址：https://sso-server.com
  - 接口服务器验证地址（service）：http://api.com/cas
  - 验证成功跳转（goto）：http://api.com/index

若单点登录服务器已经登陆了，则单点登录服务器重定向接口服务器并携带一个ticket，然后接口服务器验证ticket并存储cookie。这样就我们就登陆了。  

而若单点登录服务器没有登陆，则会返回单点登录页面，页面上会存在`lt`和`execution`两个参数。lt防止重复提交，execution保证走的同一个webflow流程。

获取了lt和execution之后，再加上我们自己的username和password就可以进行`application/x-www-form-urlencoded`的登陆了  

上面说的有点乱，见谅~~。主要存在两类服务器，一、用于请求接口的`接口服务器`（业务务器），二、用于验证登陆的`单点登录服务器`（当店登陆务器）  

![Alt text](http://img-np.xkeshi.cn/dev/w1/de/00/965295232ce6ee7b5c7b31c4b1c7.jpg)


## 安装
> npm i @xkeshi/sso-mock-login --save --registry=http://registry.fe.xkeshi.org

## 如何使用？

1. 在服务端（通常为server/app.js）引入中间件

   ```javascript
   createApp({
     middlewares: [
       // 引入单点登录中间件
       require('@xkeshi/sso-mock-login/src/koa-middleware')({ 
         url: '/api/mock/login/sso', // 选填，默认 /api/mock/login/sso，注意：这里配置的url要和下面vue中constants配置的保持一致
       })
     ],
   })
   ```

2. 在Vue2中引入插件

   ```javascript
   if (IS_DEBUG) {
     require(['@xkeshi/sso-mock-login/src/vue-plugin', '../constants'], (mockLogin, cfg) => {
       // 关于constants的配置在下面
       Vue.use(mockLogin, cfg.sso)
     })
   }
   ```

3. 配置constants

   ```javascript
   module.exports = {
     sso: {
       url: '/api/mock/login/sso',  // 选填，默认 /api/mock/login/sso，注意：这里配置的url要和下面vue中constants配置的保持一致
       prefix: '/api',  // 选填，默认 /api
       current: 'prepub', // 选填，当前选用的环境
       showAllAccount: false, // 选填，是否展示所有账户，默认显示全部，设为false则只展示当前选中的账户
       ssoHosts: { // 必填，动态切换环境时，会在请求参数中加入相应的ssoHost和apiHost
         dev: {
           ssoHost: 'https://sso.dev.xxx.net',
           apiCasUrl: 'http://api.dev.xxx.com:8080/cas'
         },
         test: {
           ssoHost: 'https://sso.test.xxx.net',
           apiCasUrl: 'http://api.test.xxx.com:8080/cas'
         },
         prepub: {
           ssoHost: 'https://sso.prepub.xxx.net',
           apiCasUrl: 'http://api.prepub.xxx.com:8080/cas'
         }
       },
       accounts: [{
          env: ['prepub'],
          type: 'admin',
          role: 'admin',
          username: 'admin',
          password: 'xxx'
        }, {
          env: ['prepub'],
          type: '代制',
          role: '代理商主账号',
          username: 'aaa',
          password: 'xxx'
        }]
     }
    }
   ```

   ​

## 例子

```
npm run dev

// 打开localhost:3999
```

## 其它

请关注后续新版本，3Q



# sso-mock-login