open-index/open-npm huggingface dataset:
npm package: @hemyn/egg-passport
Description: passport plugin for egg, base on passportjs
Author: fengmk2
Latest version: 0.4.19

# egg-passport

同`egg-passport`，有小的差异点：

1. 原来的`EggPassport`在`authenticate`时，默认会添加`successReturnToOrRedirect`，这个在api鉴权的时候不需要，因此去掉了。代码文件`packages/egg-passport/lib/passport.js`，修改方法`authenticate`
npm package: @hemyn/egg-rabbitmq
Description: rabbitmq client for egg
Author: shihao@hemyn.com
Latest version: 1.0.4

# egg-rabbitmq

<!-- [![NPM version][npm-image]][npm-url]
[![build status][travis-image]][travis-url]
[![Test coverage][codecov-image]][codecov-url]
[![David deps][david-image]][david-url]
[![Known Vulnerabilities][snyk-image]][snyk-url]
[![npm download][download-image]][download-url]

[npm-image]: https://img.shields.io/npm/v/egg-rabbitmq.svg?style=flat-square
[npm-url]: https://npmjs.org/package/@hemyn/egg-rabbitmq
[travis-image]: https://img.shields.io/travis/eggjs/egg-rabbitmq.svg?style=flat-square
[travis-url]: https://travis-ci.org/eggjs/egg-rabbitmq
[codecov-image]: https://img.shields.io/codecov/c/github/eggjs/egg-rabbitmq.svg?style=flat-square
[codecov-url]: https://codecov.io/github/eggjs/egg-rabbitmq?branch=master
[david-image]: https://img.shields.io/david/eggjs/egg-rabbitmq.svg?style=flat-square
[david-url]: https://david-dm.org/eggjs/egg-rabbitmq
[snyk-image]: https://snyk.io/test/npm/egg-rabbitmq/badge.svg?style=flat-square
[snyk-url]: https://snyk.io/test/npm/egg-rabbitmq
[download-image]: https://img.shields.io/npm/dm/@hemyn/egg-rabbitmq.svg?style=flat-square
[download-url]: https://npmjs.org/package/@hemyn/egg-rabbitmq -->

<!--
Description here.
-->

## Install

```bash
$ npm i @hemyn/egg-rabbitmq --save
```

## Usage

```js
// {app_root}/config/plugin.js
exports.rabbitmq = {
  enable: true,
  package: '@hemyn/egg-rabbitmq',
};
```

## Configuration

```js
// {app_root}/config/config.default.js
exports.rabbitmq = {
  address: "amqp://localhost:5672",
  queues: [
    {
      queue: "log1",
      queueOption: {
        durable: true,
      },
      exchange: "logs",
      exchangeOption: {
        type: "fanout",
        durable: true,
      },
      consumer: "",
      consumerOption: {},
    },
    {
      queue: "log2",
      queueOption: {
        durable: true,
      },
      exchange: "logs",
      exchangeOption: {
        type: "fanout",
        durable: true,
      },
      consumer: "",
      consumerOption: {},
    },
  ],
};
```

see [config/config.default.js](config/config.default.js) for more detail.

## Example

<!-- example here -->

## Questions & Suggestions

Please open an issue [here](https://github.com/Foreinyel/egg-rabbitmq/issues).

## License

[MIT](LICENSE)
npm package: @hemyn/moon
Description: 基于eggjs扩展的server。集成并扩展了`egg-rpc`插件，搭配`elk`，支持rpc链路追踪。
Latest version: 0.0.22

# moon

基于eggjs扩展的server。集成并扩展了`egg-rpc`插件，搭配`elk`，支持rpc链路追踪。

## 安装

```
mkdir moon-app && cd moon-app
npm init @hemyn/moon
```

## example

[moon-cloud-example](https://github.com/Foreinyel/moon-cloud-example)
npm package: @hemyn/moon-statsd
Description: [![NPM version][npm-image]][npm-url] [![build status][travis-image]][travis-url] [![Test coverage][codecov-image]][codecov-url] [![David deps][david-image]][david-url] [![Known Vulnerabilities][snyk-image]][snyk-url] [![npm download][download-image]][down
Latest version: 1.0.1

# egg-@hemyn/moon-statsd

[![NPM version][npm-image]][npm-url]
[![build status][travis-image]][travis-url]
[![Test coverage][codecov-image]][codecov-url]
[![David deps][david-image]][david-url]
[![Known Vulnerabilities][snyk-image]][snyk-url]
[![npm download][download-image]][download-url]

[npm-image]: https://img.shields.io/npm/v/egg-@hemyn/moon-statsd.svg?style=flat-square
[npm-url]: https://npmjs.org/package/egg-@hemyn/moon-statsd
[travis-image]: https://img.shields.io/travis/eggjs/egg-@hemyn/moon-statsd.svg?style=flat-square
[travis-url]: https://travis-ci.org/eggjs/egg-@hemyn/moon-statsd
[codecov-image]: https://img.shields.io/codecov/c/github/eggjs/egg-@hemyn/moon-statsd.svg?style=flat-square
[codecov-url]: https://codecov.io/github/eggjs/egg-@hemyn/moon-statsd?branch=master
[david-image]: https://img.shields.io/david/eggjs/egg-@hemyn/moon-statsd.svg?style=flat-square
[david-url]: https://david-dm.org/eggjs/egg-@hemyn/moon-statsd
[snyk-image]: https://snyk.io/test/npm/egg-@hemyn/moon-statsd/badge.svg?style=flat-square
[snyk-url]: https://snyk.io/test/npm/egg-@hemyn/moon-statsd
[download-image]: https://img.shields.io/npm/dm/egg-@hemyn/moon-statsd.svg?style=flat-square
[download-url]: https://npmjs.org/package/egg-@hemyn/moon-statsd

<!--
Description here.
-->

## Install

```bash
$ npm i egg-@hemyn/moon-statsd --save
```

## Usage

```js
// {app_root}/config/plugin.js
exports.@hemyn/moonStatsd = {
  enable: true,
  package: 'egg-@hemyn/moon-statsd',
};
```

## Configuration

```js
// {app_root}/config/config.default.js
exports.@hemyn/moonStatsd = {
};
```

see [config/config.default.js](config/config.default.js) for more detail.

## Example

<!-- example here -->

## Questions & Suggestions

Please open an issue [here](https://github.com/eggjs/egg/issues).

## License

[MIT](LICENSE)
npm package: @hemyn/utils-web
Description: 跨项目通用工具整理。
Author: shihao
Latest version: 0.4.18

# hm-utils

跨项目通用工具整理。

## package

```console
yarn build
```

## useCountDown

在`hooks`中使用`setInterval`自动计时，由于在`setInterval`中无法顺利的读取`useState`的值，因此在`setInterval`中直接调用`setState`是无效的。解决办法是使用`useRef`，直接更新`target.current`，但是这样又会出现一个问题是：虽然`target.current`的值是实时更新的，但是却无法出发组件的`re-render`的操作。因此有了这种解决办法，在`setInterval`中`setState`的值依赖的不再是`state`，改为了`target.current`。具体细节看代码，示例如下：

```javascript
import { useCountDown } from '@hemyn/utils'

const SomeComponent = () => {
  const {
    current: countDownCurrent,  // 实时读取最新的值
    start: countDownStart,  // 开始即时，同一时刻只能有一个计时器
    stop: countDownStop     // 手动停止计时
  } = useCountDown();

  ...
      countDownStart(10, 1000, afterCountToZeroRun)
  ...
      countDownStop()

  return (...<div>{countDownCurrent}</div>...)

}

```
npm package: @hemyn/web-components
Description: web components based on antd
Author: shihao
Latest version: 0.1.17

# web-components

基于`antd`封装的通用组件。

## package

```console
yarn build
```

## development

目前组件库中的`less文件`会合并为统一的`style.less`，具体项目中需要在`global.less`中统一引入，如：

```css
...
@import '~hm-web-components/lib/style.less';
...
```

因此，组件库中只能写`className`具体名：

```html
<div className="hm-query-container">
```

本地开发时，可以使用`npm link`链接到`local node_modules`，然后在引用的项目中执行`npm link hm-web-components`：

```console
cd [hm-web-components path]
npm link
cd [project path]
npm link hm-web-components
```
npm package: @henderea/node-utils
Description: Some node utility scripts
Author: Eric Henderson
Latest version: 2.6.34

# @henderea/node-utils

Some utility scripts written in NodeJS and distributed via NPM.

## Installing

```shell
npm install -g @henderea/node-utils
```

## Scripts

### xpath-get

Get a value from a file using xpath

#### Usage

```shell
xpath-get XML_FILENAME XPATH_EXPRESSION
```

```shell
xpath-get pom.xml "/project/dependencies/dependency[artifactId='log4j']/version/text()"
```

You can also call `xpath-get help`, `xpath-get --help`, or `xpath-get -h` to get usage info.

### xpath-set

Set a node's text content in a file using xpath

#### Usage

```shell
xpath-set [-y|--yes] XML_FILENAME XPATH_EXPRESSION NEW_VALUE
```

```shell
xpath-set pom.xml "/project/dependencies/dependency[artifactId='log4j']/version" "4.0.0"
```

You can also call `xpath-set help`, `xpath-set --help`, or `xpath-set -h` to get usage info.

You can pass `-y` or `--yes` to `xpath-set` to automatically confirm the change.

### moment-date

Format a date using MomentJS

#### Usage

```shell
moment-date [-o|--output-format|-f|--format OUTPUT_FORMAT] [-i|--input-format INPUT_FORMAT] [-d|--date DATE] [-t|--output-timezone OUTPUT_TIMEZONE] [-z|--input-timezone INPUT_TIMEZONE]
```

```shell
moment-date -f 'dddd, MMMM Do YYYY, h:mm:ss.SSS a'
```

Please see `moment-date help` for usage info (also available with `moment-date -h` and `moment-date --help`)
npm package: @henderea/quick-table
Description: A simplified clone of DataTables.net
Author: Eric Henderson
Latest version: 1.5.3

# @henderea/quick-table

A simplified imitation of the [DataTables](https://www.datatables.net) library.

Links:
- [Live Demo](https://quick-table.henderea.com) ([source code](https://github.com/henderea/quick-table-demo))
- [TypeScript Type Definition](https://unpkg.com/browse/@henderea/quick-table@latest/lib/index.d.ts) (on unpkg)