open-index/open-npm huggingface dataset:
npm package: @junyiz/koa-proxy-pass
Description: A light-weight, no-dependency Proxy middleware for koajs, it's similar to nginx's proxy_pass
Author: junyiz
Latest version: 1.2.3

[![Build Status](https://travis-ci.org/junyiz/koa-proxy-pass.svg?branch=master)](https://travis-ci.org/junyiz/koa-proxy-pass)

# koa-proxy-pass

A light-weight, no-dependency Proxy middleware for koajs, it's similar to nginx's proxy_pass.

## Install

```
$ npm install @junyiz/koa-proxy-pass -S
```

## Usage

When you request http://localhost:8090, it will fetch https://github.com and return.

```js
const Koa = require('koa');
const proxyPass = require('koa-proxy-pass');
const app = new Koa();
app.use(proxyPass({
  host: 'https://github.com'
}));
app.listen(8090);
```

You can proxy a specified path, use RegExp.

```js
const Koa = require('koa');
const proxyPass = require('./koa-proxy-pass');
const app = new Koa();
app.use(proxyPass({
  host: 'https://github.com',
  match: /^\/junyiz/
}));
app.listen(8090);
```

You can proxy a specified path, use koa-router.

```js
const Koa = require('koa');
const Router = require('koa-router');
const proxyPass = require('./koa-proxy-pass');
const app = new Koa();
const router = new Router();
router.get('/junyiz', proxyPass({
  host: 'https://github.com'
}));
app.use(router.routes())
app.use(router.allowedMethods());
app.listen(8090);
```

You can specify a key/value object that can map your request's path to the other.

```js
const Koa = require('koa');
const proxyPass = require('./koa-proxy-pass');
const app = new Koa();
app.use(proxyPass({
  host: 'https://github.com',
  map: {
    '/hint.svg': '/images/search-shortcut-hint.svg'
  }
}));
app.listen(8090);
```

## Options

#### host

Type: String

'host' is required

#### match

Type: RegExp

#### map

Type: Object or Function

Object is a path mapping of key-value, Function that handles paths

#### headers

Type: Object

This allows you to override request headers

## LICENSE

Copyright (c) 2018-2019 junyiz. Licensed under the MIT license.
npm package: @junyiz/request
Description: Minimalist HTTP request
Author: junyiz
Latest version: 1.0.1

# request
Minimalist HTTP request, Only dependency `iconv-lite`.

## Install

```bash
npm i @junyiz/request
```

## Requirements

You will need [iconv-lite](https://github.com/ashtuchkin/iconv-lite)

## Usage

```javascript
const request = require('@junyiz/request');

(async () => {
  const repo = await request({
    url: 'https://api.github.com/repos/junyiz/request',
    json: true,
    headers: { 'User-Agent': '@junyiz/request' }
  });
  console.log('repos id: ' + repo.id + ' repos name: ' + repo.full_name);
})();
```

## Options

#### url

Type: String

#### data

Type: String  
Default: ''

#### json

Type: Boolean  
Default: false

Parse response body with `JSON.parse`.

#### headers

Type: Object  
Default: {}

#### method

Type: String  
Default: GET

#### timeout

Type: Number  
Default: 60 * 1000

Milliseconds to wait for a server to send response headers before aborting request with `ETIMEDOUT` error.

#### retries

Type: Number  
Default: 2

#### encoding

Type: string  
Default: 'utf8'

#### agent

Type: http(s).Agent


## License

Copyright (c) 2018-2019 junyiz. Licensed under the MIT license.
npm package: @junyy/prettier-config
Description: Prettier config
Author: jun
Latest version: 1.0.1

# prettier-config

## How to install

```
npm install prettier @junyy/prettier-config
```

## How to use

In your `package.json` add:

```
"prettier": "@junyy/prettier-config"
```

Under script objects

```
"format": "prettier --write \"{,!(node_modules)/**/}*.js\""
```

## Contributing

How to [contribute] to this open source library

## License

Copyright © 2010-2020
npm package: @junyy/stylelint-config-prettier
Description: Turns off all rules that are unnecessary or might conflict with Prettier.
Author: Shannon jun
Latest version: 1.0.1

# stylelint-config-prettier

[![NPM version][npm-img]][npm-url] [![Downloads][downloads-img]][npm-url] [![Build Status][travis-img]][travis-url]

Turns off all rules that are unnecessary or might conflict with Prettier. This lets you use your favorite shareable config without letting its stylistic choices get in the way when using Prettier.

## Installation

Install `stylelint-config-prettier`:

```
$ npm install --save-dev stylelint-config-prettier
```

Then, append `stylelint-config-prettier` to the [`extends` array](https://stylelint.io/user-guide/configuration/#extends) in your `.stylelintrc.*` file. Make sure to put it **last,** so it will override other configs.

```js
{
  "extends": [
    // other configs ...
    "stylelint-config-prettier"
  ]
}
```

## CLI helper tool

`stylelint-config-prettier` is shipped with a little CLI tool to help you check if your configuration contains any rules that are in conflict with Prettier.

In order to execute the CLI tool, first add a script for it to `package.json`:

```json
{
  "scripts": {
    "stylelint-check": "stylelint-config-prettier-check"
  }
}
```

Then run `npm run stylelint-check`.

## Attribution

- Inspired by [`eslint-config-prettier`](http://npm.im/eslint-config-prettier).
- CLI helper inspired by [`tslint-config-prettier`](https://github.com/alexjoverm/tslint-config-prettier).
- Original disabled ruleset copied from [`prettier-stylelint`](http://npm.im/prettier-stylelint).
npm package: @junyy/tsconfig
Description: ## 安装
Latest version: 1.1.8

# 中台 Typescript Config

## 安装

`yarn add @junyy/tsconfig -D` or `npm i @junyy/tsconfig --dev`

## 使用

```json
// ./tsconfig.json
{
  "extends": "@junyy/tsconfig",
  "compilerOptions": {
    "baseUrl": "."
  },
  "include": ["src"]
}
```

```json
// ./settings.json
{
  "editor.codeActionsOnSave": {
    "source.fixAll.eslint": true
  },
  "typescript.tsdk": "node_modules/typescript/lib", //支持css 类型检测配置
  "typescript.enablePromptUseWorkspaceTsdk": true //支持css 类型检测配置
}
```