open-index/open-npm huggingface dataset:
npm package: @sishuguojixuefu/eslint-config
Description: ESLint config for sishuguojixuefu
Author: 杨俊宁
Latest version: 0.12.0

# @sishuguojixuefu/eslint-config

> 支持 vue、jsx、js、ts、tsx、html

## Installation

```
yarn add -D @sishuguojixuefu/eslint-config
```

## Fast Usage

Config in package.json:

```json
{
  "eslintConfig": {
    "extends": ["@sishuguojixuefu"]
  },
  "eslintIgnore": ["!.eslintrc.js", "!.prettierrc.js", "index.js"],
  "prettier": "@sishuguojixuefu/eslint-config/.prettierrc.js"
}
```

## Single File Usage

Add to your eslint config (`.eslintrc.js`):

```js
module.exports = {
  root: true,
  extends: '@sishuguojixuefu',
}
```

### react-native

```js
module.exports = {
  root: true,
  extends: '@sishuguojixuefu',
  env: {
    'react-native/react-native': true,
  },
}
```

### vue with ts

```js
module.exports = {
  root: true,
  extends: '@sishuguojixuefu',
  parserOptions: {
    parser: '@typescript-eslint/parser',
    ecmaFeatures: {
      legacyDecorators: true,
    },
  },
}
```

## More

### .eslintignore

```
!.eslintrc.js
!.prettierrc.js
```

### .prettierrc.js

```js
module.exports = {
  ...require('@sishuguojixuefu/eslint-config/.prettierrc.js'),
}
```

### .prettierignore

```
**/node_modules/*
```

### .editorconfig

```
# EditorConfig is awesome: http://EditorConfig.org

# top-most EditorConfig file
root = true

# Unix-style newlines with a newline ending every file
[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[*.md]
trim_trailing_whitespace = false

[*.gradle]
indent_size = 4

[BUCK]
indent_size = 4
```
npm package: @sishuguojixuefu/iterator
Description: 让前端分页需求更简单
Author: 杨俊宁
Latest version: 1.0.0

# @sishuguojixuefu/iterator

> 让前端分页需求更简单

## Installation

```sh
$ yarn add @sishuguojixuefu/iterator
```

## Usage

### interface

```ts
/**
 * 异常记录
 */
static getExceptionRecordsList = async (params: {}, page, size) => {
  const result: {
    data: { id: string; studentGroupName: string; startTime: string; endTime: string; outTime: boolean }[]
    total: number
  } = await request.post('/course/exception-records', { ...params, page, size })
  return result
}
```

### iterator

```js
this.Iterator = createAsyncIterator(getExceptionRecordsList, params, 10)
```

## principle

Iterator接口的实现须满足几个条件：

1. 必须是一个函数，且返回一个对象；
2. 返回的对象须包含一个 `next()` 方法；
3. `next()` 方法执行后须返回一个对象，且对象须包含代表成员的 `value` 属性、表示遍历是否结束的 `done` 属性。