open-index/open-npm huggingface dataset:
npm package: @mnui/msg
Description: Msg 提示页
Author: xiaoping
Latest version: 1.0.7

# Msg 提示页

## 说明

基于微信小程序第三方框架wepyjs开发，使用需要先安装wepyjs

## 使用

### 安装组件

> npm install @mnui/msg --save

### 引入组件

```js
// index.wpy
<template>
  <msg props="{{props}}"></msg>
</template>

<script>
import wepy from 'wepy'
import msg from '@mnui/msg'

export default class Index extends wepy.page {
  components = {
    msg
  }


}
</script>
```

## props参数

### iconObj[Object]

icon样式，默认为{ type: 'success', size: '100', color: '' }

### text[Stirng]

说明文字

### btnObj[Object]

按钮样式，默认为{ show: true, text: '完成', style: '', callback: null }
npm package: @mnui/toast
Description: Toast 轻提示
Author: xiaoping
Latest version: 1.0.7

# Toast 轻提示

## 说明

基于微信小程序第三方框架wepyjs开发，使用需要先安装wepyjs

## 使用

### 安装组件

> npm install @mnui/toast --save

### 引入组件

```js
// index.wpy
<template>
  <toast {{props}}></toast>
</template>

<script>
import wepy from 'wepy'
import toast from '@mnui/toast'

export default class Index extends wepy.page {
  components = {
    toast
  }
}
</script>
```

### 调用组件

```js
this.$invoke('toast', 'show', { // 参数
  text: '调用成功',
})
.then((res) => {
  console.log('done')
})
.catch((err) => {
  console.log('error')
})
```

## 参数

### icon[String]

icon显示

### text[String]

显示的文字

### duration[Number]

持续时间，默认1500毫秒

### style[Object]

样式，通过写在标签中的props生效
npm package: @mnui/toptips
Description: Toptips 顶部提示
Author: xiaoping
Latest version: 1.0.7

# Toptips 顶部提示

## 说明

基于微信小程序第三方框架wepyjs开发，使用需要先安装wepyjs

## 使用

### 安装组件

> npm install @mnui/toptips --save

### 引入组件

```js
// index.wpy
<template>
  <toptips {{props}}></toptips>
</template>

<script>
import wepy from 'wepy'
import toptips from '@mnui/toptips'

export default class Index extends wepy.page {
  components = {
    toptips
  }
}
</script>
```

### 调用组件

```js
this.$invoke('toptips', 'show', { // 参数
  text: '调用成功',
})
.then((res) => {
  console.log('done')
})
.catch((err) => {
  console.log('error')
})
```

## 参数

### text[String]

显示的文字

### duration[Number]

持续时间，默认1500毫秒

### style[Object]

样式，通过写在标签中的props生效
npm package: @mnuworld/gatsby-theme-events
Description: This repo is intended to teach developers how to author Gatsby themes.
Author: Anto Khan
Latest version: 1.0.1

# Authoring Gatsby Themes followed by jlengstorf egghead tutorial

This repo is intended to teach developers how to author Gatsby themes.

## Installation

**IMPORTANT:** To set this site up, you’ll need to make director named `data` in your root folder and make a file named `events.yml`

Example `events.yml`
```
- name: React Rally
  location: salt Late City, UT
  start_date: 2019-08-22
  end_date: 2019-08-23
  url: https://www.reactrally.com/

- name: React Rally 2
  location: salt Late City, UT
  start_date: 2019-08-22
  end_date: 2019-08-23
  url: https://www.reactrally.com/
```
###Install theme:
```sh
yarn add @mnuworld/gatsby-theme-events
or
npm install @mnuworld/gatsby-theme-events
```

In your `gatsby-config.js`:

```sh
  module.exports = {
    plugins: [
     {
       resolve: '@mnuworld/gatsby-theme-events',
    ]
  }
```
npm package: @mo-platform/multidict
Description: Dictionary service client for mo apps
Author: Deepak Thukral
Latest version: 1.0.9

# JS client for Multidict Service

Multidict js client provides dictionary service in various mo apps.

npm run dev

npm run build is to build

you can also include dictionary from unpkg cdn

## Install
```
<script
src="https://unpkg.com/@mo-platform/multidict@0.2.0/dist/multidict.js"></script>
<script type="text/javascript">
var dict = new MultiDictClient();
dict
.search('dyr', 'nb_NO')
.then( function(data) {
  console.log(data.data);
  data.data.phrases.forEach(function(phrase) {
    console.log(phrase);
  });
});
</script>

```
npm package: @mo-toolkit/hooks
Description: ### Hooks Provided by @mo-toolkit/hooks
Latest version: 0.0.15

# @mo-toolkit/hooks

### Hooks Provided by @mo-toolkit/hooks

This package provides the following custom React hooks:

- **usePromise**: A hook for handling promises with loading and error states.
- **useDebounce**: A hook for debouncing a value.

##

You can use these hooks to simplify common tasks in your React applications.

## Installation

You can install the package via npm:

```bash
npm install @mo-toolkit/hooks
```

or via yarn:

```bash
yarn add @mo-toolkit/hooks
```

# Usage

### usePromise

```typescript
// Your TypeScript code here
import { usePromise } from "@mo-toolkit/hooks";

// Usage example
const [fetchData, data, isLoading, error, updateData, status, resetData] = usePromise(
  async () => { // any method that returns a promise
    // Your async function here
  },
  // Base configuration options (optional)
    initReq: true, // Make an initial request
    defaultRes: null, // Default response value
    showError: true, // Show error messages
    cachedResponse: false, // Cache response (default is resetting data at each call)
);
```

#### Parameters

- **promiseFunction**: An async function that returns a Promise.
- **baseConfig**: An optional object containing base configuration options for the hook.

#### Return Values

The usePromise hook returns an array containing the following elements:

- **fetchData**: A function that triggers the promise execution.
- **data**: An optional object containing base configuration options for the hook.

- **isLoading**: A boolean indicating whether the promise is currently loading.
- **error**: The error message from the rejected promise.

- **updateData**: A function to manually updates the data.
- **status**: The status of the promise (success, idle, or error).

- **resetData**: A function to reset the hook state.

##

### useDebounce

```typescript
import React, { useState } from "react";
import { useDebounce } from "@mo-toolkit/hooks";

const MyComponent = () => {
  const [searchTerm, setSearchTerm] = useState("");
  const debouncedSearchTerm = useDebounce(searchTerm, 500);

  const handleChange = (event: React.ChangeEvent<HTMLInputElement>) => {
    setSearchTerm(event.target.value);
  };

  // Use the debounced value for API requests or other actions
  useEffect(() => {
    // Perform an API request using the debounced search term
    // Example: fetchResults(debouncedSearchTerm);
  }, [debouncedSearchTerm]);

  return (
    <input
      type="text"
      value={searchTerm}
      onChange={handleChange}
      placeholder="Search..."
    />
  );
};

export default MyComponent;
```

#### Parameters

- **value**: The value to debounce.
- **delay**: The delay (in milliseconds) before the value is updated.

#### Return Values

The useDebounce hook returns the debounced value, which is updated after the specified delay has passed.
npm package: @mo-toolkit/ui-blocks
Description: `@mo-toolkit/ui-blocks` is a collection of UI blocks and components designed to accelerate frontend development.
Latest version: 0.0.16

# Mo Toolkit UI Blocks

`@mo-toolkit/ui-blocks` is a collection of UI blocks and components designed to accelerate frontend development.

## Installation

You can install the package via npm:

```bash
npm install @mo-toolkit/ui-blocks
```

or via yarn:

```bash
yarn add @mo-toolkit/ui-blocks
```

- **Skeleton**: component provides a loading skeleton effect to indicate that content is being loaded asynchronously.
- **Tabs**: component provides a tabbed interface for displaying content.

##

# Usage

### Skeleton
a component provides a loading skeleton effect to indicate that content is being loaded asynchronously.

```typescript
import { Skeleton } from "@mo-toolkit/ui-blocks";

<Skeleton loading={gettingBalance} mockChildren={<div>1.3 BNB</div>}>
  // we're using mockChildren like this since we're expecting balance to look like this
  <span>{userBalance}</span>
</Skeleton>;
```

#### Props

The Skeleton component accepts the following props:

- **className?: string**: Additional class names for styling.
- **children: JSX.Element | JSX.Element[] | string**: The content to render when not loading.
- **mockChildren?: JSX.Element | JSX.Element[]**: Optional mock content so skeleton height match the expected content height.
- **loading: boolean**: Whether the component is in loading state or not.
- **style?: React.CSSProperties**: Additional styles to apply.

###

When loading is true, the Skeleton component will render the mockChildren or an empty skeleton container. When loading is false, the Skeleton component will render the children.

##

### Tabs
component provides a tabbed interface for displaying content.

```typescript
import { Tabs } from "@mo-toolkit/ui-blocks";

const tabs = [
  {
    id: "1",
    title: "First Tab",
  },
  {
    id: "2",
    title: "Second Tab",
  },
  {
    id: "3",
    title: "Third Tab",
  },
];

export default function App() {
  return (
    <div style={{ maxWidth: "50%", minHeight: "100vh" }}>
      <Tabs tabs={tabs}>
        <Tabs.Tab tab="1">
          <span>Content from 1</span>
        </Tabs.Tab>
        <Tabs.Tab tab="2">
          <span>Content from 2</span>
        </Tabs.Tab>
        <Tabs.Tab tab="3">
          <span>Content from 3</span>
        </Tabs.Tab>
      </Tabs>
    </div>
  );
}
```

#### Props

The Tabs component accepts the following props:

- **children: JSX.Element | JSX.Element[]**: wraps child tabs content;
- **tabs: ISingleTab[]**: An array of tab objects .
- **initCurrentTab?: string**: ID of the initial tab to be selected (defaults to the first tab).
- **hideTabPicket?: boolean**: Whether to hide the tab picker.
- **setter?: (id: string) => void**: A function to be called when the current tab changes.
- **TabPicker?: typeof DefaultTabPicker**: Component to use for tab selection (defaults to DefaultTabPicker).
npm package: @mo-tools-engine/common
Description: M'O Tools Library - Commonly needed directives, pipes, and services.
Author: Moda Operandi
Latest version: 3.0.1-beta.2

# M'O Tools Engine

The sources for this package are in the main [M'O Tools Engine](https://github.com/ModaOperandi/mo-tools-engine) repo. Please file issues and pull requests against that repo.

License: MIT
npm package: @mo-tools-engine/core
Description: M'O Tools Library - The Building Blocks of M'O Tools
Author: Moda Operandi
Latest version: 3.0.1-beta8

# M'O Tools Engine

The sources for this package are in the main [M'O Tools Engine](https://github.com/ModaOperandi/mo-tools-engine) repo. Please file issues and pull requests against that repo.

License: MIT
npm package: @mo-tools-engine/sdk
Description: M'O Tools Library - Devkit For Developing Moda Operandi Tools and the Tools Engine
Author: Moda Operandi
Latest version: 3.6.1-2

# M'O Tools Engine

The sources for this package are in the main [M'O Tools Engine](https://github.com/ModaOperandi/mo-tools-engine) repo. Please file issues and pull requests against that repo.

License: MIT
npm package: @mo-tools-engine/ui
Description: M'O Tools Library - Themable UI Components
Author: Moda Operandi
Latest version: 3.7.3

# M'O Tools Engine

The sources for this package are in the main [M'O Tools Engine](https://github.com/ModaOperandi/mo-tools-engine) repo. Please file issues and pull requests against that repo.

License: MIT
npm package: @mo-yu/cesium
Description: mo-yu cesium helper
Author: zhouyinkui
Latest version: 1.1.4

# @mo-yu/cesium

## mo-yu/cesium

cesium 定制包，基于cesium@1.120.0

### 安装

```bash
$ npm i @mo-yu/core @mo-yu/cesium
```

### 示例

[demo](http://117.72.94.210:8000)

### 文档

| Package | Description                                       |
| ------- | ------------------------------------------------- |
| mo-yu   | [文档](https://github.com/YamadaAoi/mo-yu#readme) |
npm package: @mo-yu/core
Description: mo-yu core
Author: zhouyinkui
Latest version: 1.0.16

# @mo-yu/core

## mo-yu/core

核心包

### 安装

```bash
$ npm i @mo-yu/core
```

### 示例

[demo](http://117.72.94.210:8000)

### 文档

| Package | Description                                       |
| ------- | ------------------------------------------------- |
| mo-yu   | [文档](https://github.com/YamadaAoi/mo-yu#readme) |
npm package: @mo-yu/maplibregl
Description: mo-yu maplibre-gl helper
Author: zhouyinkui
Latest version: 1.0.4

# @mo-yu/maplibregl

## mo-yu/maplibregl

maplibregl 定制包，基于maplibre-gl@4.7.1

### 安装

```bash
$ npm i @mo-yu/core @mo-yu/maplibregl
```

### 示例

[demo](http://117.72.94.210:8000)

### 文档

| Package | Description                                       |
| ------- | ------------------------------------------------- |
| mo-yu   | [文档](https://github.com/YamadaAoi/mo-yu#readme) |
npm package: @mo-yu/vue
Description: mo-yu vue
Author: zhouyinkui
Latest version: 1.0.21

# @mo-yu/vue

## mo-yu/vue

vue 组件

### 安装

```bash
$ npm i @mo-yu/core @mo-yu/vue
```

### 示例

[demo](http://117.72.94.210:8000)

### 文档

| Package | Description                                       |
| ------- | ------------------------------------------------- |
| mo-yu   | [文档](https://github.com/YamadaAoi/mo-yu#readme) |
npm package: @mo.inkhan/random-chars
Description: A simple and lightweight npm package for generating random chars. Perfect for creating unique identifiers, and other random text. With customizable length and character set options, it's easy to generate strings that fit your specific requirements.
Author: Moin Khan
Latest version: 1.0.6

# random-chars
A simple and lightweight npm package for generating random strings. Perfect for creating unique identifiers, and other random text. With customizable length and character set options, it's easy to generate strings that fit your specific requirements.

## Install

```bash
npm i @mo.inkhan/random-chars
```

## Usage

```ts
const randomChars = require('@mo.inkhan/random-chars')

randomChars()
randomChars('id_', 12, '1234567890')
```

## License

[MIT](LICENSE)
npm package: @mo0on/react-library-template
Description: This is library template with **ReactJS v18**, **storybook v7**, **Typescript**, **SCSS**, **Rollup.js**. <br/>
Author: Chaeyeon Moon
Latest version: 0.0.3

# React Library Template
This is library template with **ReactJS v18**, **storybook v7**, **Typescript**, **SCSS**, **Rollup.js**.
<br/>

## Guide

### 🧩 Make Your Library Project with this template
<img width="919" alt="image" src="https://github.com/Moonchaeyeon/react-library-template/assets/49464171/9504d55d-14ee-4ec1-9aec-84dd0343f852">
<br/>

Click `Use this template` button to create new repository using this template <br/>
<br/>
Then clone that repository locally
<br/>

```bash
git clone "[github url using this template]"
```
<br/>

### ⚙️ Set Library Info
You can change library information in `package.json`
```json
{
	"name": "[library name]",
	"author": {
		"name": "[your name]",
		"email": "[your email]"
	},
	"version": "[library version]",
}
```
<br/>

### ☕️ Install Packages
Install related packages.
```bash
yarn
```
<br/>

### 🛍 Customize Your Library
* working directory : `./src`
* export your components, functions, etc. from `./src/index.ts`
<br/>


### 🧪 Test Your Library
You can test your UI components with `Storybook`
```bash
yarn storybook
```
<br/>

### 🔨 Build
Build your library with `Rollup.js.`
```bash
yarn build
```
* Your library build file will generate on `./dist`
<br/>

### 🎉 Publish Your Library to NPM
```
npm login
yarn publish --access public
```
* Login with your npm account
	* to create a new account 👉 https://www.npmjs.com/
* Publish your library
	* When publishing for the first time, the access property must be set to public.
	* The next publication should always be a higher version than the previous publication.
npm package: @mo0on/shamirs-secret-sharing
Description: A simple implementation of Shamir's Secret Sharing configured to use a finite field in GF(2^8) with 128 bit padding
Author: Chaeyeon
Latest version: 0.0.3

shamirs-secret-sharing
======================

A simple implementation of Shamir's Secret Sharing configured to use a
finite field in GF(2^8) with 128 bit padding.

## Preface

Much of what you see in this module has been ported from or
directly influenced by
[secrets.js](https://github.com/grempe/secrets.js),
[c-sss](https://github.com/fletcher/c-sss), and
[libgfshare](https://launchpad.net/libgfshare)

## Installation

```sh
$ npm install shamirs-secret-sharing
```

## Example Usage

```js
const sss = require('shamirs-secret-sharing')
const secret = Buffer.from('secret key')
const shares = sss.split(secret, { shares: 10, threshold: 4 })
const recovered = sss.combine(shares.slice(3, 7))
console.log(recovered.toString()) // 'secret key'
```

## API

### `shares = sss.split(secret, opts)`

Generate a set of unique and distinct shares for a secret with a
configured threshold.

* `secret` (**required**) - A `Buffer` instance or `string` that represents a
  secret for which shares are created for
* `opts` (**required**) - An object of options for configuring how
  shares are created for a secret
  * `opts.shares` (**required**) - The number of `n` shares that should
    be created for this secret
  * `opts.threshold` (**required**) - The number of `t` of `n` distinct share
    that are required to reconstruct this secret
  * `opts.random` (*optional*) - An optional _Pseudorandom number
    generator_ (PRNG) function that should generate a random value
    buffer based on some input. e.g `opts.random = (size) =>
    randomBytes(size)`

### `secret = sss.combine(shares)`

Reconstruct a secret from a distinct set of shares. This function _will
not_ throw an error for incorrect shares or if `p(0)` is not the correct
secret for the given shares.

* `shares` (**required**) - An array of shares, that is an array of
  equally sized and distinct `Buffer` instances, or _strings_

## See Also

* https://en.wikipedia.org/wiki/Shamir%27s_Secret_Sharing
* https://en.wikipedia.org/wiki/Secret_sharing
* https://en.wikipedia.org/wiki/Lagrange_polynomial
* https://en.wikipedia.org/wiki/Horner%27s_method
* https://en.wikipedia.org/wiki/Pseudorandom_number_generator
* https://codesandbox.io/s/shamirs-secret-sharing-pcsbk

## License

MIT
npm package: @mo3ta-dev/react-native-markdown-display
Description: react-native-markdown-display with some changes
Author: Mient-jan Stelling and Tom Pickard + others from the community
Latest version: 0.2.4

# mo3ta-markdown ![NPM Version](https://img.shields.io/npm/v/mo3ta-markdown)

This project is a fork of [react-native-markdown-display](https://github.com/iamacup/react-native-markdown-display), created to address maintenance gaps and introduce improvements.

# Installation

```bash
npm i mo3ta-markdown
```
See the package on [npm](https://www.npmjs.com/package/mo3ta-markdown).

# New Features

## Sample App

- Try out the library in the included sample app.
- The sample app will be updated with practical examples and tips.

## Enhanced `onLinkPress`

- The `onLinkPress` callback now provides both the URL and the clicked text, enabling use cases like analytics for link clicks.

```jsx
<Markdown
  onLinkPress={(url, text) => {
    // Handle link press
    console.log('Link pressed:', url);
    console.log('Link text:', text);
    return false; // Adjust logic as needed
  }}
>
  {markdown}
</Markdown>
```

## Security and Linting Improvements

- Upgraded `markdown.it` to address vulnerabilities.
- Fixed lint issues and added ESLint checks for better pre-commit workflows.
npm package: @mo_lee/utils
Description: deepCopy range once rand promiseLike debounce throttle
Author: mo_lee
Latest version: 0.0.5

> # utils

This module provides various utility functions written in Vanilla JavaScript.

> ## Install

This is a **Node.js** module available through the **npm registry**.<br>
Please download and install **Node.js** before proceeding with the installation.

The installation using `npm install` is performed using the following command.

```
npm i @mo_lee/utils
```

Note: It is written in ESM format and may not function correctly in some Content Management Systems (CMS).

> ## Function

version 0.0.5

- makeGenerator

version 0.0.4
- debounce
- throttle
- deepCopy
- promiseLike
- rand
- range



<br>

> ## Usage
>
> <br>

### debounce

```javascript
import { debounce } from "@mo_lee/utils";

const printNumber = debounce(console.log, 1000);

let count = 0;

const printInter = setInterval(() => {
  if ((count += 1) > 20) return clearInterval(printInter);
  printNumber(1);
}, 100);

// Executes once after 3 seconds
```

<br>

### throttle

```javascript
import { throttle } from "@mo_lee/utils";

const printNumber = throttle(console.log, 1000);

let count = 0;

const printInter = setInterval(() => {
  if ((count += 1) > 20) return clearInterval(printInter);
  printNumber(1);
}, 100);

// Run twice for 2 seconds
```

<br>

### deepCopy

```javascript
import { deepCopy } from "@mo_lee/utils";

class Dog {
  name;
  constructor(name) {
    this.name = name;
  }
}

const user = {
  id: 1,
  name: "Jone",
  addr: {
    city: "New York City",
    Detailed: {
      Borough: "Brooklyn",
    },
  },
  like: ["soccer", "food"],
  pet: new Dog("lucy"),
};

const copiedUser = deepCopy(user); // user !==  copiedUser
```

<br>

### promiseLike

```javascript
import { promiseLike } from "@mo_lee/utils";

const myPromise = new promiseLike((resolve, reject) => {
  setTimeout(() => {
    const now = Date.now();
    if (now % 2 >= 0) resolve(now);
    else reject(new Error("error"));
  }, 1000);
});

myPromise.then((res) => console.log(res)); // promise OK
```

<br>

### rand

```javascript
import { rand } from "@mo_lee/utils";

console.log(rand(1, 10)); //Random number between 1 and 10
console.log(rand(5, 20)); //Random number between 5 and 20
```

<br>

### range

```javascript
import { range } from "@mo_lee/utils";

range(0); // [0]
range(1, 10, 1); // [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
range(1, 10); // [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
range(10, 1, -2); // [10, 8, 6, 4, 2]
range(-5); // [-5, -4, -3, -2, -1]
```

<br>

### makeGenerator

```javascript
import { makeGenerator } from "@mo_lee/utils";

const user = { id: 1, name: "John", job: "Doctor" };

for (const value of user) console.log(value); // Error: user is not iterable

makeGenerator(user);

for (const value of user) console.log(value); // OK!
/*
1
John
Doctor
*/
```

> ## People

mo_lee

<br>

> ## License

**MIT**