open-index/open-npm huggingface dataset:
npm package: @maqibin/react-use-lottery
Description: react hooks for lottery
Author: maqibin
Latest version: 1.0.2

# react-use-lottery

react hooks for lottery.

## Installation

```bash
npm install @maqi1520/react-use-lottery
```

## Usage

```jsx
import useLottery from @maqi1520/react-use-lottery
import React from "react";

faker.setLocale("zh_CN");

const awards = [
  {
    name: "一等奖",
    count: 10,
    img: "/fc01a7a528f9c531.png",
    time: 10,
  },
  {
    name: "二等奖",
    count: 30,
    img: "/78bfc03faf8b1e2d.png",
    time: 5,
  },
  {
    name: "三等奖",
    count: 50,
    img: "/934dbc9de37038f2.png",
    time: 5,
  },
];

export default function App() {
    const users=[{ id: 1, name: "username" },...]
  const { toggle, award, showUsers, result } = useLottery(users, awards, {
    三等奖: [701, 702],
  });
  // 一次抽几个
  const currentNumber = award.count / award.time;
  const currentWinners = result[award.name] || [];

  console.log(result);

  return (
    <div>
      <button onclick={toggle}>toggle</button>
    </div>
  );
}
```

## License

[MIT](https://choosealicense.com/licenses/mit/)
npm package: @maqta/formio-angular
Description: This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 10.1.4.
Author: Travis Tidwell
Latest version: 5.4.0

# AngularFormio

This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 10.1.4.

## Code scaffolding

Run `ng generate component component-name --project angular-formio` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module --project angular-formio`.
> Note: Don't forget to add `--project angular-formio` or else it will be added to the default project in your `angular.json` file. 

## Build

Run `ng build angular-formio` to build the project. The build artifacts will be stored in the `dist/` directory.

## Publishing

After building your library with `ng build angular-formio`, go to the dist folder `cd dist/angular-formio` and run `npm publish`.

## Running unit tests

Run `ng test angular-formio` to execute the unit tests via [Karma](https://karma-runner.github.io).

## Further help

To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI README](https://github.com/angular/angular-cli/blob/master/README.md).
npm package: @mar-sn/js-ui
Description: This library will help greatly with development when  constructing a UI with javascript. Currently the library contains the following elements: - Button - Input - Fieldset (with input) - Table - Grid layout - Panel - Popup
Author: Martin Broers
Latest version: 0.5.0

# JsUi
This library will help greatly with development when 
constructing a UI with javascript. Currently the library contains
the following elements:
- Button
- Input
- Fieldset (with input)
- Table
- Grid layout
- Panel
- Popup

## Requirements

- Node package manager (NPM)
- Optional gulp installed globally

## How to use
The design of the library is that you can (mostly) choose what 
you want to use in terms of imports. Use npm to download dependencies
followed by `gulp build`. Use requirejs to define and use the components.

Please see index.html in test for examples.


## Credits
Special thanks to the creators of these awesome libraries:

- trumbowyg: https://alex-d.github.io/Trumbowyg/
- table-dragger: https://github.com/sindu12jun/table-dragger
- moments-js: https://github.com/moment/moment-timezone/
- flatpickr: https://github.com/flatpickr/flatpickr
- requirejs: https://github.com/requirejs/requirejs
npm package: @mar.contentful/poc-inline-comments
Description: ```bash npm install @contentful/field-editor-rich-text ```
Author: Contentful GmbH
Latest version: 4.3.22

# @contentful/field-editor-rich-text

```bash
npm install @contentful/field-editor-rich-text
```

This package contains a React `RichTextEditor` component that is used as the default for `RichText` field type in the Contentful web application.

```js
import 'codemirror/lib/codemirror.css';
import { RichTextEditor } from '@contentful/field-editor-rich-text';
```

## Migrating to v2

To bring support for Rich Text Tables we rewrote most of the internals of this package to adapt the latest version of [Slate][slate]. We are releasing this change as v2.0.0.

There are two ways our users typically use the rich-text field editor:

### 1. By embedding `@contentful/field-editor-rich-text` npm package

Since the public API exposed by the package remains the same, upgrading to v2 should be seamless as it's just a matter of installing the latest version from npm. No migration is needed.

### 2. By forking the source code

You will need to adapt your fork to work with v2. Here is a highlight of the major changes:

1. Using Slate >= v0.80.0. If you're upgrading from < 0.50.x Please check the library [migration guide](https://docs.slatejs.org/concepts/xx-migrating)
2. Using Plate as a plugin system. Plate is a powerful plugin system to make it easy to work with Slate. All of the existing rich text plugins were rewritten to use Plate. To learn more, please check Plate's [website][plate].

## Credits

This package is based on [Slate][slate] & [Plate][plate] and also borrows some of their code. Without them, this project would not have been possible.

[slate]: https://www.slatejs.org/
[plate]: https://plate.udecode.io/
npm package: @mar1/bananaswap-sdsk
Description: Moonbeam SDK
Author: mar1dev
Latest version: 1.0.91

# Uniswap SDK

[![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square)](https://github.com/prettier/prettier)
[![Actions Status](https://github.com/Uniswap/uniswap-sdk/workflows/CI/badge.svg)](https://github.com/Uniswap/uniswap-sdk)
[![npm version](https://img.shields.io/npm/v/@uniswap/sdk/latest.svg)](https://www.npmjs.com/package/@uniswap/sdk/v/latest)
[![npm bundle size (scoped version)](https://img.shields.io/bundlephobia/minzip/@uniswap/sdk/latest.svg)](https://bundlephobia.com/result?p=@uniswap/sdk@latest)

In-depth documentation on this SDK is available at [uniswap.org](https://uniswap.org/docs/v2/SDK/getting-started/).

## Address Modifications

When deploying a new instance in Moonbase Alpha, you need to modify the address in the following files:

WETH: `./src/entities/token.ts`
Factory: `./src/constants.ts`

## Running tests

To run the tests, follow these steps. You must have at least node v10 and [yarn](https://yarnpkg.com/) installed.

First clone the repository:

```sh
git clone https://github.com/Uniswap/uniswap-sdk.git
```

Move into the uniswap-sdk working directory

```sh
cd uniswap-sdk/
```

Install dependencies

```sh
yarn install
```

Run tests

```sh
yarn test
```

You should see output like the following:

```sh
yarn run v1.22.4
$ tsdx test
 PASS  test/constants.test.ts
 PASS  test/pair.test.ts
 PASS  test/fraction.test.ts
 PASS  test/miscellaneous.test.ts
 PASS  test/entities.test.ts
 PASS  test/trade.test.ts

Test Suites: 1 skipped, 6 passed, 6 of 7 total
Tests:       3 skipped, 82 passed, 85 total
Snapshots:   0 total
Time:        5.091s
Ran all test suites.
✨  Done in 6.61s.
```
npm package: @mara/babel-plugin-ci-ignore
Description: 忽略 ci 检查
Author: mingyu6
Latest version: 1.0.2

# `@mara/babel-plugin-ci-ignore`

> babel-loader 的插件，通过字符串分割的方法跳过 ci 检查

## Install

Using npm:

```bash
npm install --save-dev @mara/babel-plugin-ci-ignore
```

or using yarn:

```bash
yarn add @mara/babel-plugin-ci-ignore --dev
```

## Usage

```js
const BabelPluginCIIgnore = require('@mara/babel-plugin-ci-ignore')

{
  plugins: [[BabelPluginCIIgnore]]
}
```
npm package: @mara/babel-plugin-console-prefix
Description: console 增加前缀
Author: mingyu6
Latest version: 1.0.2

# `@mara/babel-plugin-console-prefix`

> babel-loader 的插件，给项目的 console 增加前缀

## Install

Using npm:

```bash
npm install --save-dev @mara/babel-plugin-console-prefix
```

or using yarn:

```bash
yarn add @mara/babel-plugin-console-prefix --dev
```

## Usage

```js
const BabelPluginConsolePrefix = require('@mara/babel-plugin-console-prefix')

{
  plugins: [
    [
      BabelPluginConsolePrefix,
      {
        // customPrefix: 'prefix',  // 自定义前缀，开发组件时建议将该值设置为组件名称
        exclude: ['sncLog'], // 排除某些文件，会用正则过滤
        showLocation: false // 是否显示行号 [index.js 4:13]
      }
    ]
  ]
}
```
npm package: @mara/devkit
Description: mara develop toolkit
Author: Vincent Lee
Latest version: 1.2.1

# @mara/toolkit

> mara develop toolkit

- buffer2String
- cliBadge
- ensureSlash
- es5Check
- fetch
- getFreePort
- getGitRepoName
- isObject
- localIp
- md5
- ProcessBar
- Stopwatch
npm package: @mara/image-loader
Description: A loader for webpack which compress png/svg/jpg images
Author: Vincent Lee
Latest version: 1.0.3

# @mara/image-loader

A loader for webpack which compress png/svg/jpg images.

- Use `tinify` to compress `png`/`jpg`
  - Cache tinify results
  - Dynamic scheduling tinify keys
- Use `svgo` to compress `svg`

## Install

```bash
yarn add @mara/image-loader -D
```

## Usage

**webpack.config.js**

With `url-loader`:

```javascript
module.exports = {
  module: {
    rules: [
      {
        test: /\.(bmp|png|jpe?g|gif|webp|svg)$/,
        loader: require.resolve('url-loader'),
        options: {
          limit: 1024 * 4,
          tinifyKeys: [tinify_key1, [...tinify_keyn]],
          minify: process.env.NODE_ENV === 'production',
          // use image-loader when a target file's size exceeds the limit
          fallback: require.resolve('@mara/image-loader'),
          name: `static/img/[name].[contenthash:8].[ext]`
        }
      }
    ]
  }
}
```

Use alone:

```javascript
module.exports = {
  module: {
    rules: [
      {
        test: /\.(bmp|png|jpe?g|gif|webp|svg)$/,
        loader: require.resolve('@mara/image-loader'),
        options: {
          tinifyKeys: [tinify_key1, [...tinify_keyn]],
          minify: process.env.NODE_ENV === 'production',
          name: `static/img/[name].[contenthash:8].[ext]`
        }
      }
    ]
  }
}
```

## Options

| Name       | Type     | Default        | Description                                                                                                           |
| ---------- | -------- | -------------- | --------------------------------------------------------------------------------------------------------------------- |
| name       | string   | '[hash].[ext]' | Custom filename template. See [placeholders](https://github.com/webpack-contrib/file-loader#placeholders) for details |
| tinifyKeys | string[] | []             | Developer API keys from [tinypng.com](https://tinypng.com/)                                                           |
| minify     | boolean  | true           | Set false to disable compression, equivalent to `file-loader`                                                         |
npm package: @mara/plugin-extract-comp-meta
Description: This plugin extract component meta data from decorators
Author: Vincent Lee
Latest version: 0.3.4

# @mara/plugin-extract-comp-meta

[![npm](https://img.shields.io/npm/v/@mara/plugin-extract-comp-meta.svg)](https://www.npmjs.com/package/@mara/plugin-extract-comp-meta)

从装饰器中提取 Vue 组件元数据

## 使用

```bash
yarn add @mara/plugin-extract-comp-meta -D
```

npm script

```bash
"scripts": {
  "prepublishOnly": "marax hook prepublishOnly",
  ...
 },
```
npm package: @mara/schema-utils
Description: Marauder Validation Utils
Author: Vincent Lee
Latest version: 1.0.2

# Schema Utils

JSON Schema Validator. Extracted from [webpack](https://github.com/webpack/webpack).

Feature: Customize error messages with the `description` properties.

## Install

```bash
yarn add @mara/schema-utils
```

## Usage

schema.json

```javascript
{
  "type": "object",
  "properties": {
    "name": {
      // custom error message
      "description": "name description",
      "type": "string"
    },
    "test": {
      "anyOf": [
        { "type": "array" },
        { "type": "string" },
        { "instanceof": "RegExp" }
      ]
    },
    "transform": {
      "instanceof": "Function"
    },
    "sourceMap": {
      "type": "boolean"
    }
  },
  "additionalProperties": false
}
```

```javascript
import schema from 'path/to/schema.json'
import validateOptions from '@mara/schema-utils'

const inputOptions = {
  name: 'hello'
}
const valid = validateOptions(schema, inputOptions, 'Config Filename')

if (valid) {
  // do something...
}
```
npm package: @marandino/tz-country-code
Description: Automatically detect a user's country based on their timezone, providing an easy and efficient way to get location information without relying on IP addresses.
Author: Chiyen Venegas
Latest version: 1.0.2

# @marandino/tz-country-code

Automatically detect a user's country based on their timezone, providing an easy and efficient way to get location information without relying on IP addresses.

## Installation

```bash
npm install @marandino/tz-country-code
```

or

```bash
yarn add @marandino/tz-country-code
```

## Usage

```javascript
import { getCountryCode } from "@marandino/tz-country-code";

// Get the country code (e.g., 'US')
const countryCode = getCountryCode("code");
console.log(countryCode);

// Get the country name (e.g., 'United States')
const countryName = getCountryCode("name");
console.log(countryName);
```

## License

MIT
npm package: @marantesss/powerlifting-formulas
Description: Powerlifting Formulas Calculator (Wilks, WilksV2, Dots, IPF, Reshel and Glossbrenner)
Author: Marantesss
Latest version: 0.2.1
Deprecated: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

# Powerlifting Formulas

Check [this article](https://www.taylorsstrength.co.uk/powerlifting-formulas-is-wilks-best-and-what-are-the-alternatives/) to learn more about formulas.

## Getting started

Install this package with you favorite package manager

```bash
npm install powerlifting-formulas
yarn add powerlifting-formulas
pnpm install powerlifting-formulas
```

Then use it like so:

```ts
import { wilks } from 'powerlifting-formulas'

// calculate OLD wilks formula for 82.5kg male lifer with 680kg lifted
wilks(82.5, 680, 'male')
// calculate new wilks formula for 120lbs female lifer with 425lbs lifted
wilks(120, 425, 'female', 'lb')
```

## Formulas

### Wilks before 2020

```ts
import { wilks } from 'powerlifting-formulas'

// calculate OLD wilks formula for 82.5kg male lifer with 680kg lifted
wilks(82.5, 680, 'male')
// calculate new wilks formula for 120lbs female lifer with 425lbs lifted
wilks(120, 425, 'female', 'lb')
```

### Wilks After 2020

```ts
import { wilks2020 } from 'powerlifting-formulas'

// calculate OLD wilks formula for 82.5kg male lifer with 680kg lifted
wilks2020(82.5, 680, 'male')
// calculate new wilks formula for 120lbs female lifer with 425lbs lifted
wilks2020(120, 425, 'female', 'lb')
```

### DOTS

```ts
import { dots } from 'powerlifting-formulas'

// calculate OLD wilks formula for 82.5kg male lifer with 680kg lifted
dots(82.5, 680, 'male')
// calculate new wilks formula for 120lbs female lifer with 425lbs lifted
dots(120, 425, 'female', 'lb')
```