open-index/open-npm huggingface dataset:
npm package: @meronex/form
Description: A simple react form for React Material UI (and potential other)
Author: meronex
Latest version: 1.1.4

# Meronex Form

Simple React forms with validation for React MUI.

## Features

-   ✅ Validate onBlur or onChange
-   ✅ Same API for classes and functional components
-   ✅ Easy to fork and modify to your needs

![demo](https://merobase-photos.s3-eu-west-2.amazonaws.com/nQEPuETDDvaNFBm6w/m_form.gif)

## Usage

1. Install **`npm i @meronex/form`**

2. Import `import Form from '@meronex/form';`

3. Add the form
   `<Form ref={validatedForm} onUpdate={(_formData) => { setFormData(_formData); }} blurDelay={500}> ... React MUI Fields Here </Form`

    Notice that we've a **`ref`** attached which exposes a **`validatedForm.reset(`**) method and we've an **`onUpdate`** method which is triggered every time there change to the form. The **blurDelay** default is zero, and it used to delay blur validation to allow time for animation etc.

4. Add the @material-ui fields with name (required), defaultValue (optional for edit forms) and validator (optional for validation) attributes.

    `<TextField name={'name'} label="Name" defaultValue={'a'} validate={(v) => { if (!v || v === '') return 'Name is required..!!'; return true; }} />`

    That's it! The onUpdate will be triggered with all the form data, you can then set it to the state object.

    note that the defaultValue and validator are optional. You only need the name attribute for the form to hook for the field. Also, this works with the TextField using select attribute.

### Props & Functions

| Prop           | Description                                            |
| -------------- | ------------------------------------------------------ |
| name \*        | Required field to hook the form to the field           |
| defaultValue   | Optional default value                                 |
| validator      | Validator function to be triggered onBlur              |
| blurDelay      | Intenger to delay triggering the blur validation in ms |
| validateOnInit | Boolean value to validiate on form init                |

The Form also exposes the following ref functions:

| Function   | Description             |
| ---------- | ----------------------- |
| reset()    | Reset the form          |
| validate() | Force validate the form |

## Why?

1. Dead-simple API
2. Minimal documentation/concepts
3. Easy to fork, copy and modify (it is only a single file with no build step)
4. Zero dependencies
5. Extremely tiny (1.2kb minified + gzipped)

## How it works?

The Form component will bind methods/props to the child fields. The `value, onBlur, onChange, error and helperText` props are automatically handled, a form object is created to capture the state of the form and that object is passed to the onUpdate method with every change.

## Other libraries

-   Looking for React Icons? try [Meronex Icons](https://icons.meronex.com/)
npm package: @merorafael/torrent-cli
Description: Torrent CLI to create, download and seed torrent files
Author: Rafael Mello
Latest version: 0.1.1

torrent-cli
===========

Torrent CLI to create, download and seed torrent files.

[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)
[![Version](https://img.shields.io/npm/v/@merorafael/torrent-cli.svg)](https://npmjs.org/package/torrent-cli)
[![Downloads/week](https://img.shields.io/npm/dw/@merorafael/torrent-cli.svg)](https://npmjs.org/package/torrent-cli)
[![License](https://img.shields.io/npm/l/@merorafael/torrent-cli.svg)](https://github.com/merorafael/torrent-cli/blob/master/package.json)

<!-- toc -->
* [Usage](#usage)
* [Commands](#commands)
<!-- tocstop -->
# Usage
<!-- usage -->
```sh-session
$ npm install -g @merorafael/torrent-cli
$ torrent-cli COMMAND
running command...
$ torrent-cli (-v|--version|version)
@merorafael/torrent-cli/0.1.0 linux-x64 node-v11.15.0
$ torrent-cli --help [COMMAND]
USAGE
  $ torrent-cli COMMAND
...
```
<!-- usagestop -->
# Commands
<!-- commands -->
* [`torrent-cli create`](#torrent-cli-create)
* [`torrent-cli help [COMMAND]`](#torrent-cli-help-command)
* [`torrent-cli share`](#torrent-cli-share)

## `torrent-cli create`

Create a torrent file

```
USAGE
  $ torrent-cli create

OPTIONS
  -d, --downloadUrl=downloadUrl  (required) Download url used for WebSeed and download file if localUrl is not informed
  -l, --localUrl=localUrl        Local file url
  --announce=announce            Tracker announce address used for torrent download
  --[no-]private                 Make a private torrent file (Works only on specified announcer tracker)
  --src=src                      [default: ./] Directory when torrent file is write
```

_See code: [src/commands/create.js](https://github.com/merorafael/torrent-cli/blob/v0.1.0/src/commands/create.js)_

## `torrent-cli help [COMMAND]`

display help for torrent-cli

```
USAGE
  $ torrent-cli help [COMMAND]

ARGUMENTS
  COMMAND  command to show help for

OPTIONS
  --all  see all commands in CLI
```

_See code: [@oclif/plugin-help](https://github.com/oclif/plugin-help/blob/v2.2.0/src/commands/help.ts)_

## `torrent-cli share`

Download and share torrent file

```
USAGE
  $ torrent-cli share

OPTIONS
  -f, --torrentFile=torrentFile  (required) Torrent file address
  -p, --path=path                [default: ./] Folder to download files
  -t, --timeout=timeout          [default: 0] Client timeout after download completed in milliseconds(0 for infinity)
  --[no-]dht                     Enable/Disable BitTorrent DHT protocol
  --[no-]tracker                 Enable/Disable BitTorrent Tracker protocol
  --[no-]webSeeds                Enable/Disable web seeds
```

_See code: [src/commands/share.js](https://github.com/merorafael/torrent-cli/blob/v0.1.0/src/commands/share.js)_
<!-- commandsstop -->
npm package: @meroxa/meroxa-js
Description: Meroxa Platform API JS client
Author: Brett Goulder
Latest version: 1.7.1

## Meroxa JS

## Installation

```
npm install https://github.com/meroxa/meroxa-js.git
```

## Usage

```
import { Client } from "@meroxa/client"

// Initializing a client
let meroxa = new Client({
auth: process.env.MEROXA_TOKEN,
})

;(async () => {
let resources = await meroxa.resources.list()
}
```

## Requirements

Runtime: node >= 12
Type definitions (optional): typescript >= 4.2
npm package: @merry-solutions/debounce
Description: Simple debounce factory function that creates an async version of a passed function which executes after a given delay. Built with typescript and promises.
Author: Volodymyr Yepishev
Latest version: 1.0.1

# debounce

Simple debounce factory function that creates an async version of a passed function which executes after a given delay. Built with typescript and promises.

## Installation

```bash
npm i @merry-solutions/debounce
```

## Usage

Simply create a debounced version of any function. Passing a function you get back a tuple consisting of a debounced version of the passed function and an additional function that can cancel the debounced version's pending execution at any time.

Running debounced function:

```typescript
import { debounce } from '@merry-solutions/debounce';

function saySomething(): void {
  console.log('Something');
}

const [debouncedSaySomething] = debounce(saySomething, 100);

// Is going to say something only once
for (let x = 0; x < 99; x++) {
  debouncedSaySomething();
}
```

Cancelling debounced function before execution:

```typescript
import { debounce } from '@merry-solutions/debounce';

function saySomething(): void {
  console.log('Something');
}

const [debouncedSaySomething, cancel] = debounce(saySomething, 100);

// Won't say anything
for (let x = 0; x < 99; x++) {
  debouncedSaySomething();
}
cancel();
```

Simple as that :)
npm package: @merry-solutions/memoize-decorator
Description: A function to decorate methods and memoize their results to speed up further requests done with the same arguments.
Author: Volodymyr Yepishev
Latest version: 1.0.0

# Memoize Decorator

## Well, what is it?

A function to decorate methods and memoize their results to speed up further requests done with the same arguments.

## How to use it

```bash
npm i @merry-solutions/memoize-decorator
```

The decorator can accept the following payload:

```typescript
export interface MemoizePayload {
  // The function that will determine a unique id for the provided arguments set, you write iy
  extractUniqueId: (...args: any[]) => any;
  // Pass true if you want to use WeakMap, not that it requires keys to be objects
  doUseWeakMap?: boolean;
  // If regular map is used, you can set timeout to clear its contents, optional
  clearCacheTimeout?: number;
  // For debug purposes you can pass an exta function for logging all actions
  debugReporter?: (message: string, state?: Map<any, unknown> | WeakMap<object, unknown> | unknown) => void;
}
```

Now let's assume there's some class doing some calculations:

```typescript
interface CalculationPayload {
  id: number;
  someCountdownNumber: number;
}

class ObjectCountdownCalculator {
  public countdown({ someCountdownNumber }: CalculationPayload): number {
    let count = 0;
    while (count < someCountdownNumber) {
      count += 1;
    }
    return count;
  }
}
```

Assuming the unique arguments' identifier is the id of the passed object, we could decorate it:

```typescript
import { memoize } from '@merry-solutions/memoize-decorator';

class ObjectCountdownCalculator {
  @memoize({
    extractUniqueId: (a: CalculationPayload) => a.id,
  })
  public countdown({ someCountdownNumber }: CalculationPayload): number {
    let count = 0;
    while (count < someCountdownNumber) {
      count += 1;
    }
    return count;
  }
}
```

And poof! Our method is now leveraging the power of memoization to reduce execution time :)
npm package: @merry-solutions/type-filter
Description: Type filter is a package, the purpose of which is to provide proper typing to filtered results. The types are now narrowed according to the filtering condition.
Author: Volodymyr Yepishev
Latest version: 1.1.0

# @merry-solutions/type-filter

## Well, what is it?

Type filter is a package, the purpose of which is to provide proper typing to filtered results.
For example, given an array of numbers:

```typescript
const numbers = [1, 2, 3, 4, 5];
const filtered = numbers.filter((n) => n === 2);
```

The type of `filtered` variable is still `Array<number>`, while in reality after the filter has been applied, it sould be `Array<2>`. And this is exactly what this package does: provides propert typing to the filtered array items.

## Installation

```
npm i @merry-solutions/type-filter
```

## Usage

Supposed you have a user interface and an array of users:

```typescript
interface User {
  name: string;
  address: {
    geo: {
      lat: string;
      lng: string;
    };
  };
}

const USERS: User[] = [
  {
    address: {
      geo: {
        lat: '11',
        lng: '22',
      },
    },
    name: 'Bob',
  },
  {
    address: {
      geo: {
        lat: '33',
        lng: '33',
      },
    },
    name: 'Mary',
  },
];
```

To filter out users and get an array in which every user has specific name, i.e. `Bob`, we pass the interface, along with property path and the filtering value:

```typescript
import { typeFilter } from '@merry-solutions/type-filter';

const results = typeFilter<User, 'name', 'Bob'>(USERS, 'name', 'Bob');

results[0].name;
// name is no longer of 'string' type, it is 'Bob' now
```

Nested paths are also supported, the nested level is the 4th parameter in the generics list, by default the max level is 99, so filtering by `lng` would look the following way:

```typescript
import { typeFilter } from '@merry-solutions/type-filter';

const results = typeFilter<User, 'address.geo.lng', '33'>(
  USERS,
  'address.geo.lng',
  '33'
);
// results[0].address.geo.lng is now of type '33' instead of 'string'
```

For filtering of primitives there is `primitiveTypeFilter` which is even more simple:

```typescript
import { primitiveTypeFilter } from '@merry-solutions/type-filter';

const arrayOf2s = primitiveTypeFilter<number, 2>([1, 2, 3, 4, 5], 2);
// arrayOf2s type is Array<2>
```
npm package: @merryjs/cli
Description: A cli for everything ❤️
Author: bang
Latest version: 1.9.2

# cli [![Build Status](https://travis-ci.org/merryjs/cli.svg?branch=master)](https://travis-ci.org/merryjs/cli)

> A package for write generator easier. you can write your own plugins publish it to npm or put it in local.
> write local plugins are very useful when we have some project related components or file structures.

## Install

```
$ npm install -g @merryjs/cli

# or

$ yarn global add @merryjs/cli
```

## Usage

```sh
$ merry
```

## License

MIT © [bang](https://github.com/bang88)
npm package: @merryjs/mini
Description: 基于蚂蚁金服移动设计规范的 React Native 组件库
Latest version: 3.0.1

[English](./README.md) | 简体中文

<p align="center">
  <a href="http://rn.mobile.ant.design">
    <img width="320" src="https://zos.alipayobjects.com/rmsportal/wIjMDnsrDoPPcIV.png">
  </a>
</p>

# Ant Design Mobile RN
[![](https://img.shields.io/travis/ant-design/ant-design-mobile-rn.svg?style=flat-square)](https://travis-ci.org/ant-design/ant-design-mobile-rn)
[![Codecov](https://img.shields.io/codecov/c/github/ant-design/ant-design-mobile-rn.svg?style=flat-square)](https://codecov.io/gh/ant-design/ant-design-mobile-rn)
[![npm package](https://img.shields.io/npm/v/@merryjs/mini.svg?style=flat-square)](https://www.npmjs.org/package/@merryjs/mini)
[![NPM downloads](http://img.shields.io/npm/dm/@merryjs/mini.svg?style=flat-square)](https://npmjs.org/package/@merryjs/mini)
[![Dependency Status](https://david-dm.org/ant-design/ant-design-mobile-rn.svg?style=flat-square)](https://david-dm.org/ant-design/ant-design-mobile-rn)
[![Percentage of issues still open](http://isitmaintained.com/badge/open/ant-design/ant-design-mobile-rn.svg)](http://isitmaintained.com/project/ant-design/ant-design-mobile-rn "Percentage of issues still open")
[![Join the chat at https://gitter.im/ant-design/ant-design](https://img.shields.io/gitter/room/ant-design/ant-design.svg?style=flat-square)](https://gitter.im/ant-design/ant-design?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)

`@merryjs/mini` 是居于 Ant Design 的移动规范的 React 实现的React Native UI framework。

## 特性

- 基于 Ant Design 移动设计规范。
- 规则化的视觉样式配置，适应各类产品风格。
- 基于 React Native 的多平台支持。
- 使用 TypeScript 开发，提供类型定义文件。

## 演示

<img width="250" src="https://user-images.githubusercontent.com/1698185/27175806-f0a8a7f0-51f2-11e7-85fb-4b7ea9f89e5b.png" />

请先安装 expo app： https://expo.io/tools

## 安装 & 使用
npm package: @merryjs/swagger
Description: > Lets say we want generate codes from swagger api. but the scheme's type is different with `JavaScript`. so we need convert it to `JavaScript` type
Author: bang88
Latest version: 2.0.2

# Swagger [![Build Status](https://travis-ci.org/bang88/swagger.svg?branch=master)](https://travis-ci.org/bang88/swagger)

> Lets say we want generate codes from swagger api. but the scheme's type is different with `JavaScript`.
> so we need convert it to `JavaScript` type

_Note_:

This is a WIP project. ☢

_TODO_:

* [x] convert schema type to `TypeScript` type
* [x] generate `TypeScript` type definitions from swagger definitions
* [x] generate a readable data format from swagger api that we can use it in handlebar templates easier
* [ ] write a plugin for `@merryjs/cli` so we can generate `React` or `React Native` project
* [x] write a plugin for `@merryjs/cli` so we can generate console projects that using `Ant-Design` as UI framework
* [ ] write tests

## Installation

```sh
yarn add @merryjs/swagger # or
npm install @merryjs/swagger --save
```

## Usage

```ts
// to be continue
```
npm package: @merryjs/toast
Description: A Toast for React Native 
Author: bang88
Latest version: 1.0.3


# @merryjs/toast
> Same as ToastAndroid, ios using https://github.com/scalessec/Toast

![preview.gif](preview.gif)
## Getting started

`$ npm install @merryjs/toast --save`

### Mostly automatic installation

`$ react-native link @merryjs/toast`

### Manual installation


#### iOS

1. In XCode, in the project navigator, right click `Libraries` ➜ `Add Files to [your project's name]`
2. Go to `node_modules` ➜ `@merryjs/toast` and add `MerryToast.xcodeproj`
3. In XCode, in the project navigator, select your project. Add `libMerryToast.a` to your project's `Build Phases` ➜ `Link Binary With Libraries`
4. Run your project (`Cmd+R`)<


## Usage

Please see http://facebook.github.io/react-native/docs/toastandroid.html

```javascript

import MerryToast from '@merryjs/toast';
MerryToast.show('A pikachu appeared nearby !', MerryToast.SHORT);
MerryToast.showWithGravity('All Your Base Are Belong To Us', MerryToast.SHORT, MerryToast.CENTER);

```
npm package: @merrymaker/types
Description: Merry Maker Typings
Author: Target Brands, Inc.
Latest version: 1.0.10

# MerryMaker Shared Types

These are shared Typescript Typings for the MerryMaker platform.


They are currently used in the API, Jobs, and Scanner (rules).

## Install

```
yarn install @merrymaker/types
```

---

```
Copyright (c) 2021 Target Brands, Inc.
```
npm package: @merrywhether/config
Description: Common config files for @merrywhether projects
Author: merrywhether
Latest version: 6.1.0

# &#64;merrywhether/config

[![npm version](https://badge.fury.io/js/%40merrywhether%2Fconfig.svg)](https://www.npmjs.com/package/%40merrywhether%2Fconfig)
[![Renovate dashboard](https://img.shields.io/badge/dependencies%20by-renovate-%231A1F6C?logo=renovatebot)](https://app.renovatebot.com/dashboard)
[![Lint Status](https://github.com/merrywhether/config/actions/workflows/lint.yml/badge.svg)](https://github.com/merrywhether/config/actions/workflows/lint.yml?query=branch%3Amain)
[![Version](https://img.shields.io/badge/version++-black?logo=npm)](https://github.com/merrywhether/config/actions/workflows/version.yml)

Common config files for &#64;merrywhether projects

## Usage

Installation:

```sh
pnpm add -D @merrywhether/config
```

This will generate a `.projenrc.js` file in the root of your project. Update
that config with your desired settings and then run `node .projenrc.js` to have
it create the appropriate configuration files.

## Configuration Details

### ESLint

The base ESLint configuration includes the following plugins/configs:

- [`eslint`](https://eslint.org/docs/rules/) (recommended++)
- [`import`](https://github.com/import-js/eslint-plugin-import#rules)
- [`prettier`](https://github.com/prettier/eslint-plugin-prettier#recommended-configuration)
  (recommended)
- [`sort-destructure-keys`](https://github.com/mthadley/eslint-plugin-sort-destructure-keys#usage)
- [`sort-keys-fix`](https://github.com/leo-buneev/eslint-plugin-sort-keys-fix#usage)

When the `typescript` option is selected, the following are added:

- [`@typescript-eslint`](https://github.com/typescript-eslint/typescript-eslint/tree/master/packages/eslint-plugin#supported-rules)
  (recommended++, including type-aware)

When the `react` option is selected, the following are added:

- [`react`](https://github.com/yannickcr/eslint-plugin-react#list-of-supported-rules)
  (recommended++, jsx-runtime)
- [`react-hooks`](https://www.npmjs.com/package/eslint-plugin-react-hooks#installation)
  (recommended++)
- [`typescript-sort-keys`](https://github.com/infctr/eslint-plugin-typescript-sort-keys#usage)
  (recommended)

When the `solid` option is selected, the following are added:

- [`solid`](https://github.com/joshwilsonvu/eslint-plugin-solid#rules)
  (recommended)
- [`react`](https://github.com/yannickcr/eslint-plugin-react#list-of-supported-rules)
  (JSX-specific rules)

### Prettier

Uses the [default Prettier settings](https://prettier.io/docs/en/options.html)
with the following changes:

- `experimentalTernaries: true` (embrace the future)
- `proseWrap: always` (wrapping Markdown).
- `singleQuote: true` (because this is JS! 😛)

### Typescript

The base configuration has all of the strictest settings enabled and targets
`esnext`.

When the `styled` option is selected,
[`@styled/typescript-styled-plugin`](https://github.com/styled-components/typescript-styled-plugin)
is added.

When the `solid` option is selected, the `jsxImportSource` is appropriately
updated.