open-index/open-npm huggingface dataset:
npm package: @pjblog/message
Description: pjblog:message
Author: shenyunjie
Latest version: 1.0.4

# @pjblog/message

消息通讯模块，适用于部分RPC或IPC类型通讯，比如进程通讯或者Webosocket,ws通讯，都能很好支持。
但不支持类似需要拆包的通讯协议，类似dubbo等等。
它的作用就是简单地定义通讯规范，通过`request`方法或者`notify`方法来发送通讯数据并且得到返回结果。

## Installer

```bash
$ npm i @pjblog/message
```

## Example

```ts
import { ProcessClusterMessage, Message } from '@pjblog/message';
const msg = new ProcessClusterMessage();
msg.resolve((data, attachment) => {
  // receive message and resolve it
  // return any results for sending back
})

msg.request({
  a: 1
}).then(...)

msg.on(Message.EVENT_READ, data => {
  // ... read some data
})

msg.on(Message.EVENT_WRITE, data => {
  // ... write some data
})
```
npm package: @pjblog/vite-middleware
Description: PJBlog 主题开发工程之 vite 中间件
Latest version: 2.3.8

# @pjblog/vite-middleware

PJBlog主题开发插件支持 - vite

## Install

```bash
$ npm i @pjblog/vite-middleware
$ pnpm i @pjblog/vite-middleware
```

## Usage

```ts
import ViteDevServer from '@pjblog/vite-middleware';
createBlog({...}, [ViteDevServer]): void;
```
npm package: @pjbrof/aemsync-webpack-plugin
Description: aemsync webpack plugin updated for Adobe AEM 6.4
Author: Patrick Brophy
Latest version: 1.0.1

aemsync-webpack-plugin
=======

### Description

Webpack plugin used for uploading files to Adobe AEM. Updated for Adobe 6.4. It will upload files after manual change or webpack build finish.

For more information about AEMSync visit: https://github.com/gavoja/aemsync

### Installation

```
npm install @pjbrof/aemsync-webpack-plugin
```

### Usage

JavaScript
```
    var AemSyncPlugin = require('@pjbrof/aemsync-webpack-plugin');

    plugins: [
        new AemSyncPlugin({
            targets: [
                'http://admin:admin@localhost:4502',
                'http://admin:admin@localhost:4503'
            ],
            workingDir: './',
            exclude: '/node_modules/',
            interval: 300 //ms
        })
    ],
```

AEM Sync will be initialized only for webpack watch mode

```
webpack --watch 

```
npm package: @pjchender/function-benchmarker
Description: A simple benchmark for testing function performance
Author: PJCHENder
Latest version: 1.0.5

# Function Benchmarker

[![Build status](https://badgen.net/travis/pjchender/react-use-opentok)](https://travis-ci.com/pjchender/react-use-opentok)
[![version](https://img.shields.io/npm/v/@pjchender/function-benchmarker.svg)](https://www.npmjs.com/package/@pjchender/function-benchmarker)
[![Coverage Status](https://coveralls.io/repos/github/pjchender/function-benchmarker/badge.svg?branch=master)](https://coveralls.io/github/pjchender/function-benchmarker?branch=master)

A simple benchmark for testing function performance. Through the package, you can compare the cost time of different functions.

## Guide

Import '@pjchender/function-benchmarker` and make the function you want to test as a parameter. Function-benchmarker will return the cost time executing the function in milliseconds.

```js
const benchmarker = require('@pjchender/function-benchmarker');

function jsonStringify() {
  JSON.stringify({
    foo: 'bar',
  });
}

const costTime = benchmarker(jsonStringify);
console.log('costTime', costTime);
```

## API

By default, function-benchmarker will run the function to test for 1,000,000 times and calculate the cost time (ms). You can pass the times for executing the function as the second parameter.

```js
const costTime = benchmarker(functionToTest, [times]);
```

## Test

```bash
$ npm test
```

## LICENSE

MIT
npm package: @pjediny/react-notification
Description: React redux notification
Author: Pavol Jediny
Latest version: 0.0.9

# React redux notification
Komponenta pre vykreslenie flash message. Zdrojom dat je redux.

## Instalacia ##

    npm i -S @pjediny/react-notification

## Integracia ##
**Reducer**

    import { notificationReducer } from '@pjediny/react-notification';
    
    const rootReducer = combineReducers({
	 notification: notificationReducer
	});
	
	export default rootReducer;

**Routes**

    import Notifications from '@pjediny/react-notification';
	
	export class Routes extends Component {
	  render() {
	    return (
	      <div>
	        <Notifications />
	        <Switch>
	          ...
	        </Switch>
	      </div>
	    );
	  }
	}

	export default Routes;

**SCSS**
Importovat SCSS z *node_modules/@pjediny/react-notification/src/scss/_notifications.scss*

## Pouzitie ##

    import React, { Component } from 'react';
	import { bindActionCreators } from 'redux';
	import { connect } from 'react-redux';
	import { addSuccess, addError, addInfo, addWarning } from '@pjediny/react-notification';
	import UserDatatable from './UserDatatable.jsx';
	
	class Datatable extends Component {
	  constructor(props) {
	    super(props);
	    this.createNotification = this.createNotification.bind(this);
	  }
	
	  createNotification() {
	    this.props.actions.addSuccess('Info message', 'test', 1000);
	    this.props.actions.addError('Info message');
	    this.props.actions.addInfo('Info message');
	    this.props.actions.addWarning('Info message');
	  }
	
	  render() {
	    return (
	      <div className="animated fadeIn">
	        <button className="btn btn-info" onClick={this.createNotification}>
	          Info
	          </button>
	        <div className="row">
	          <div className="col-lg-12">
	            <div className="card">
	              <div className="card-header"><i className="fa fa-align-justify"></i>Users</div>
	              <div className="card-block">
	                <UserDatatable />
	              </div>
	            </div>
	          </div>
	        </div>
	      </div>
	    );
	  }
	}
	
	const mapDispatchToProps = (dispatch) => ({
	  actions: bindActionCreators({ addSuccess, addError, addInfo, addWarning }, dispatch)
	});
	
	export default connect(null, mapDispatchToProps)(Datatable);

## License

MIT