open-index/open-npm huggingface dataset:
npm package: @molitio/mwe-ui-core
Description: Re-usable React UI Components
Author: Peter Koller, Molitio LLC
Latest version: 0.3.1

# @molitio/mwe-ui-core by molitio - In service of humanity for every human being.

- [@molitio/mwe-ui-core by molitio - In service of humanity, for every human being.](#-molitio-mwe-ui-core-by-molitio---in-service-of-humanity--for-every-human-being)
    - [universal component library to serve as building block for any web application](#universal-component-library-to-serve-as-building-block-for-any-web-application)
    - [Contributors](#contributors)

<small><i><a href='http://ecotrust-canada.github.io/markdown-toc/'>Table of contents generated with markdown-toc</a></i></small>

## universal component library to serve as building block for any web application

A universal component library built mainly with React and TypeScript, targeting esm, cjs, umd
module types and made to work with server and client side alike. With styled-components it provides predefined markup and style with system driven theme management, and many options to customize.
npm package: @mollerse/dat.gui-midi-control
Description: dat.gui with added functionality for controlling params with a midi device
Author: Stian Møllersen
Latest version: 3.0.0
Deprecated: Replaced by @mollerse/midi-control

# dat.gui-midi-control

`STATUS: Experimental`

dat.gui with added functionality for controlling params with a midi device.

This is something I use for personal projects and will not be maintained as a proper library. Use at own risk.

If you want something maintaned, have a look at [`gregsadetsky/dat.gui.midi`](https://github.com/gregsadetsky/dat.gui.midi).
npm package: @mollerse/midi-control
Description: Functionality for binding a tweakpane pane to a MIDI Device
Author: Stian Møllersen
Latest version: 2.4.1

# MidiControl

`STATUS: Experimental`

This is something I use for personal projects and will not be maintained as a proper library. Use at own risk.

Bind a control pane (tweakpane) to a MIDI device for ease of use.

See `/test` for example usage.
npm package: @mollitia/prometheus
Description: Prometheus Mollitia Addon
Author: Jérémie Pichon
Latest version: 0.1.0

# Mollitia

<p align="center"><br/><img width="200" src="https://genesys.github.io/mollitia/favicon.svg" alt="Mollitia Icon"/><br/><br/></p>

> Mollitia - Prometheus Addon

The `Mollitia` [Prometheus](https://prometheus.io/) addon adds metrics on every circuit and module so that you can monitor and analyze your applications.

## 📄 Documentation

Please check out the official documentation to get started using **Mollitia**, visit [genesys.github.io/mollitia](https://genesys.github.io/mollitia).

## ⚙️ Installation

``` bash
npm install --save @mollitia/prometheus
```

## 🚀 Usage

``` typescript
// Imports the library
import * as Mollitia from 'mollitia';
import { PrometheusAddon } from '@mollitia/prometheus';
// Adds the prometheus addon to Mollitia
Mollitia.use(new PrometheusAddon());
// Creates a circuit
const myCircuit = new Mollitia.Circuit({
	func: yourFunction
});
// This will execute yourFunction('dummy')
await myCircuit.execute('dummy');
// Get metrics and scrap from Prometheus
const metrics = Mollitia.metrics(); // Will return an object containing all metrics from all circuits and modules
const scrap = Mollitia.scrap(); // Will return the Prometheus scrap
```
npm package: @mollitia/redis
Description: Redis Addon
Author: Stephane Hervochon
Latest version: 0.0.3

# Mollitia

<p align="center"><br/><img width="200" src="https://genesys.github.io/mollitia/favicon.svg" alt="Mollitia Icon"/><br/><br/></p>

> Mollitia - Redis Addon

The `Mollitia` [Redis](https://redis.io/) addon adds redis for some modules of every circuit. The list of modules coming with redis support are Ratelimit, SlidingCountBreaker and SlidingTimeBreaker.

## 📄 Documentation

Please check out the official documentation to get started using **Mollitia**, visit [genesys.github.io/mollitia](https://genesys.github.io/mollitia).

## ⚙️ Installation

``` bash
npm install --save @mollitia/redis
```

## 🚀 Usage

``` typescript
// Imports the library
import * as Mollitia from 'mollitia';
import { RedisAddon } from '@mollitia/redis';
// Adds the Redis addon to Mollitia
Mollitia.use(new RedisAddon({
  host: <Redis hostName>,
  port: <Redis Port>,
  password: <Redis Password>
}));
// Creates the module that will be used in your circuit, using Redis
// Redis is only applicable for Modules:
//  - Ratelimit
//  - SlidingCountBreaker
//  - SlidingTimeBreaker
const rateLimit = new Mollitia.Ratelimit({
  name: 'myRateLimit',
  limitForPeriod: 2,
  limitPeriod: 20000,
  redis: {
    // Setting redis.use to true indicates Redis should be used
    use: true
  }
};
// Creates a circuit
const myCircuit = new Mollitia.Circuit({
  // Initializes a circuit with a handler
  func: yourFunction,
  options: { 
    modules: [ 
      rateLimit 
    ]
  }
});
// This will execute yourFunction('dummy')
await myCircuit.execute('dummy');

```
npm package: @molmedoz/rpg-dice-roller
Description: An advanced JS based dice roller that can roll various types of dice and modifiers, along with mathematical equations.
Author: molmedoz
Latest version: 1.0.1

# RPG Dice Roller

[![Build Status](https://github.com/molmedoz/rpg-dice-roller/actions/workflows/build.yml/badge.svg)](https://github.com/molmedoz/rpg-dice-roller/actions/workflows/build.yml)
[![Coverage Status](https://coveralls.io/repos/github/molmedoz/rpg-dice-roller/badge.svg?branch=master)](https://coveralls.io/github/molmedoz/rpg-dice-roller?branch=master)
![Tyepscript friendly](https://img.shields.io/badge/typescript-supported-blue)
[![MIT license](https://img.shields.io/badge/License-MIT-blue.svg)](licence.txt)
[![npm downloads](https://img.shields.io/npm/dm/@molmedoz/rpg-dice-roller)](https://www.npmjs.com/package/@dice-roller/rpg-dice-roller)

A JS based dice roller that can roll various types of dice and modifiers, along with mathematical equations.
This is a fork of [@dice-roller/rpg-dice-roller](https://dice-roller.github.io/documentation)


## Install

```bash
npm install @molmedoz/rpg-dice-roller
```

## Documentation

Check out the documentation from original project https://dice-roller.github.io/documentation

## Special Success

Order 9 (critical failure is now 10 and sorting is 11)

When a die rolls a high possible result, such as rolling <= 20% of skills on a d% , this is called a special success.

However, sometimes you want a special success to be on a different value, or a range.

To specify what is considered as a special success, add `ss` and a Compare Point, after the die notation:

```javascript
// roll a d10 4 times, anything greater than 7 is a critical success
4d%sp<=12
```

We're always happy for community contributions. You can find our contributing guide in the docs: https://molmedoz.github.io/documentation/contributing

```javascript
// the rolls of 5 and 11 are critical successes
5d%sp<=12: [13, 5++, 11++, 15, 68] = 62
```

## Licence

This dice roller has been released under the MIT licence, meaning you can do pretty much anything you like with it, so long as the original copyright remains in place.

You **can** use it in commercial products.

If the licence terminology in the licence.txt is confusing, check out this: https://www.tldrlegal.com/l/mit
npm package: @moln/cross-domain-ajax
Description: Cross domain AJAX via window.postmessage, for IE6/7/8. 使用 postmessage 解决IE 6/7/8 AJAX跨域问题.
Author: Moln
Latest version: 0.1.3

低版本浏览器跨域AJAX
===================

Cross domain AJAX via `window.postmessage`, for IE6/7/8.

使用 postmessage 处理IE 6/7/8 AJAX跨域问题.


工作原理
-------

页面 `a.com/a.html` 直接通过ajax请求 `b.com/api/b` , 在低版本浏览器调用中会产生跨域问题.

假设有个 `b.com/proxy.html` , 由它 ajax请求 `b.com/api/b` 是不会有跨域问题.

解决方法就是, 使用 `postmessage`(低版本浏览器有 `window.opener` hack 方式), 

把 `a.com/a.html` 要ajax请求的参数通过 `postmessage` 方法传到 `b.com/proxy.html`, 
然后由 `b.com/proxy.html` ajax请求 `b.com/api/b`. 解决了低版本的跨域问题.

Installation / 安装
-------------------

Using npm to install this package.

你可以使用 npm 安装

```bash
npm install @moln/cross-domain-ajax --save
```

Or `yarn`(Recommend)

或者`yarn`(推荐)

```bash
yarn add @moln/cross-domain-ajax -S
```


Usage / 使用
-------------

示例: `http://127.0.0.1:8080/index.html` 请求 `http://127.0.0.2:8080/test.json`


###  调用端使用示例

调用端: `http://127.0.0.1:8080/index.html`

关键调用代码:

```javascript
var CrossAjax = require('./cross-domain-ajax');
var cajax = new CrossAjax('http://127.0.0.2:8080/cross-proxy.html'); //

cajax.ready(function () {
    cajax.ajax({
        url: 'test.json',
        success: function (data, req) {
            console.log("success", data, req);
        },
        error: function () {
            console.log("error", arguments);
        },
        complete: function () {
            console.log("complete", arguments);
        }
    });
});
```

### 代理端示例

1. 编写请求来源限制
2. 通过 webpack 生成 `cross-proxy.html`

代理端代码示例:

```javascript
var cdp = require('./cross-domain-proxy');

//限制请求来源
cdp.onVerifyOrigin(function (origin) {

    console.log(origin);
    if (!/localhost:8080$/.test(origin)) {
        throw new Error('Invalid origin ' + origin);
    }
});
```
npm package: @moln/data-source
Description: [![GitHub Actions: Run tests](https://github.com/moln/data-source/actions/workflows/main.yml/badge.svg)](https://github.com/Moln/data-source/actions?query=branch%3Amain) [![Coverage Status](https://coveralls.io/repos/github/Moln/data-source/badge.svg?bran
Author: Moln
Latest version: 0.6.2

# data-source

[![GitHub Actions: Run tests](https://github.com/moln/data-source/actions/workflows/main.yml/badge.svg)](https://github.com/Moln/data-source/actions?query=branch%3Amain)
[![Coverage Status](https://coveralls.io/repos/github/Moln/data-source/badge.svg?branch=master)](https://coveralls.io/github/Moln/data-source?branch=master)
[![GitHub license](https://img.shields.io/github/license/Moln/data-source)](https://github.com/Moln/data-source)
[![npm](https://img.shields.io/npm/v/@moln/data-source.svg)](https://www.npmjs.com/@moln/data-source)

便捷性管理集合数据状态操作，用于 vue, react 等视图应用库

## 依赖 

- mobx
- axios

## 安装

```
npm install @moln/data-source
```

或者使用 `yarn`

```
yarn add @moln/data-source
```


## 使用

```js
const resources = new Resources()
const dataSource = resources.create("/api/users")

dataSource.fetch();  // GET /api/users
console.log(dataSource.data) // Response collections

const item = dataSource.get(1) // Get item by primary 
item.name = "foo"

// Sync changes 
dataSource.sync()
// PATCH /api/users/1
// Body: {"name":"foo"}
```

### React + Mobx

```js
import {Table, Button} from 'antd'
import {observer} from "mobx-react-lite"
const useDataSource = (resource) => {
    /// Request restful resource
    return useMemo(() => (new Resources()).createDataSource(`/api/${resource}`), []);
    
    // Array data source
    // return useMemo(() => (new Resources()).createDataSource([
    //     {id: 1, name: 'Tom', score: 3},
    //     {id: 2, name: 'Jerry', score: 4},
    // ]), []);
}
const App = observer(() => {
    const ds = useDataSource("users")
    const handleDelete = (row) => {
        ds.remove(row)
        ds.sync() // Sync data source changes, request `DELETE /users/{id}`
    }
    const handleIncrScore = (row) => {
        row.score++
        ds.sync() // Sync data source changes, request `PATCH /users/{id}`, body: `{"score": 3}`
    }
    return (
        <Table
            rowKey={ds.primary}
            dataSource={ds.data}
            loading={ds.loading}
            columns={[
                {
                    dataIndex: 'id',
                    title: '#',
                },
                {
                    dataIndex: 'name',
                    title: 'Name',
                },
                {
                    dataIndex: 'score',
                    title: 'score',
                },
                {
                    render: (row) => {
                        return <Button onClick={() => handleIncrScore(row)}>Incr</Button>
                        return <Button loading={ds.loadings.syncing} onClick={() => handleDelete(row)}>Delete</Button>
                    }
                },
            ]}
        />
    )
})
```
npm package: @moln/page-resource-loader
Description: Web resource loader. For resolve web page display loading.
Author: Moln
Latest version: 1.0.1

# Page resource loader

Web resource loader. For resolve web page display loading.

Web 资源加载器, 用于网页处理显示loading 和百分比.


Installation / 安装
-------------------


```bash
npm install @moln/page-resource-loader --save
```

Or 或者

```bash
yarn add @moln/page-resource-loader -S
```


Usage / 使用
--------------

```html
<style>
.body {background-image: url("somebg.jpg")}
</style>
<video src="some.mp4" id="video1"></video>
<audio src="some.mp3" id="audio"></audio>
<script >
$(function () {
    
    var $video = $('#video1');
    var $audio = $('#audio');
    var resources = [
        {
            type: "video",
            elem: $video,
        },
        {
            type: "video",
            elem: $audio,
        },
        {
            type: 'img',
            src: 'http://192.168.80.159/someimg.jpg'
        },
        {
            type: 'deferred',
            defer: $.Deferred(function (resolve) {
                setTimeout(function () {
                    resolve();
                }, 1000)
            })
        },
        {
            type: 'img',
            src: 'http://192.168.80.159/someimg.jpg'
        },
        {
            type: 'style',
            content: $('style')[0].innerHTML
        },
    ];
    var loader = new ResourceLoader(resources);
    loader.onResourceReady = function () {
        var curProcess = parseInt((this.finished / this.resources.length) * 100) + '%';
        console.log(curProcess);

        if (this.finished === this.resources.length) {
            console.log('OK!');
        }
    };
    loader.load();
})
</script>
```
npm package: @moln/simple-es6-template-compiler
Description: Simple es6 template compiler.
Author: Moln
Latest version: 0.1.3

Simple es6 template compiler / 简易的ES6模板解析器
=================================================

Usage / 使用
-------------

```js
var es6Compiler = require('@moln/simple-es6-template-compiler');
es6Compiler(
    "Sum: ${param1} + ${param2} = ${ param1 + param2 }\n" + 
    "Concat: ${ concat('hello', 'world') }", 
    {
        param1: 1, 
        param2: 2,
        concat: function (a, b) {
            return a + ' ' + b
        }
    }
); 
//Sum: 1 + 2 = 3
//Concat: hello world
```