open-index/open-npm huggingface dataset:
npm package: @mozisan/eslint-plugin
Description: ESLint plugin
Author: mozisan
Latest version: 2.3.0

# `@mozisan/eslint-plugin`

## Installation

```sh
npm i -D @mozisan/eslint-plugin
```

## Usage

```json
{
    "extends": ["plugin:@mozisan/preset"]
}
```

```json
{
    "extends": ["plugin:@mozisan/preset-react"]
}
```

```json
{
    "extends": ["plugin:@mozisan/preset-next"]
}
```

```json
{
    "extends": ["plugin:@mozisan/preset-tailwindcss"]
}
```
npm package: @mozisan/next-layout
Description: Simple & type-safe way to implement page layout for Next.js
Author: mozisan
Latest version: 1.0.4

# next-layout

## Installation

```sh
npm i -S @mozisan/next-layout
```

## Usage

```tsx
// pages/foo.tsx
import { defineLayout } from "@mozisan/next-layout";

const withLayout = defineLayout((page) => (
  <div>
    <header>...</header>
    <main>{page}</main>
  </div>
));

export default withLayout(function FooPage() {
  return <div>...</div>;
});
```

```tsx
// pages/_app.tsx
import type { AppProps } from "next/app";
import { PageRenderer } from "@mozisan/next-layout";

export default function App(props: AppProps) {
  return <PageRenderer {...props} />;
}
```
npm package: @mozisan/react-form
Description: Form builder for React
Author: mozisan
Latest version: 0.0.3

# @mozisan/react-form

## Installation

```sh
$ npm install -S @mozisan/react-form
```

```sh
$ yarn add @mozisan/react-form
```

## Basic usage

```tsx
import {
  boolean,
  number,
  string,
  useForm,
} from '@mozisan/react-form';
import React from 'react';

export const RegistrationForm: React.FC = () => {
  const { field, handleSubmit } = useForm({
    fields: {
      name: string(),
      age: number(),
      acceptsPolicy: boolean(),
    },
  });

  return (
    <form onSubmit={handleSubmit((data) => { ... })}>
      <div>
        <input ref={field('name')} type="text" />
      </div>

      <div>
        <input ref={field('age')} type="number" />
      </div>

      <div>
        <input ref={field('acceptsPolicy')} type="checkbox" />
      </div>

      <button type="submit">Submit</button>
    </form>
  );
};
```
npm package: @mozleo/node-starter
Description: Personal boilerplate to kickstart creating a Node.js module/repo
Author: Tommy Lee
Latest version: 1.0.0
Deprecated: no longer need to publish on npm

# node-starter
> Personal boilerplate to kickstart creating a Node.js module/repo.

## usage
In your work directory, run:

```bash
> curl -fsSL https://github.com/Tommy-White/node-starter/archive/master.tar.gz | tar -xz --strip-components=1
```

You can also `git clone` or [download](https://github.com/Tommy-White/node-starter/archive/master.zip) this repo and get contents of the `boilerplate` folder.

## Include
  - ESLint
  - Jest for Test
  - Code formatting
  - ...
npm package: @moznion/anchor-automata
Description: A library to make automation for Anchor.fm; like an API client but not
Author: moznion
Latest version: 0.0.1

# anchor-automata

A library to make automation for [Anchor.fm](https://anchor.fm).

## Status

THIS LIBRARY IS UNDER-DEVELOPMENT STATUS. DON'T USE THIS ON THE PRODUCTION GROUND.

And this won't cover all the functions, i.e. this library implements the functions what I wanted.
But of course, feature requests are welcome.

## Example

### Make an episode draft

```typescript
import { URL } from 'url';
import * as fs from 'fs';
import { Signin, Publish } from '@moznion/anchor-automata';

(async (): Promise<void> => {
  const baseURL = new URL('https://anchor.fm');

  const signinCmd = new Signin(baseURL);
  const cookies = await signinCmd.do('your-email', 'your-password');

  const publishCmd = new Publish(baseURL, cookies);
  const buff = await fs.readFileSync('/path/to/your/audio.mp4');
  await publishCmd.do(
    'episode title',
    `this is an awesome episode!!<br>
<a href='https://example.com'>https://example.com</a>
`,
    true, // <= HTML supported note
    1, // <= season number
    100, // <= episode number
    buff,
    'mp4',
    true, // <= dry-run mode (i.e. if true, it just makes a draft)
  );
})();
```

## Features

- sign-in
- publish an episode

## Author

moznion (<moznion@mail.moznion.net>)

## License

MIT
npm package: @moznion/limited-concurrent-workers
Description: A library that provides a limited number of concurrent workers
Author: moznion
Latest version: 0.0.1

# limited-concurrent-workers-js [![.github/workflows/check.yml](https://github.com/moznion/limited-concurrent-workers-js/actions/workflows/check.yml/badge.svg)](https://github.com/moznion/limited-concurrent-workers-js/actions/workflows/check.yml) [![codecov](https://codecov.io/gh/moznion/limited-concurrent-workers-js/branch/main/graph/badge.svg?token=Y8IYCBWLNT)](https://codecov.io/gh/moznion/limited-concurrent-workers-js) [![npm version](https://badge.fury.io/js/@moznion%2Flimited-concurrent-workers.svg)](https://badge.fury.io/js/@moznion%2Flimited-concurrent-workers)

A library that provides a limited number of concurrent workers for JavaScript/Typescript.

## Motivation

In JavaScript, if it needs to run the async functions parallelly with a restriction of the number of concurrent workers, the code has to be a little idiomatic. This library provides some wrappers for that purpose by using the Generator, for easiness and simplicity.

## Synopsis

```ts
function* generator(): IterableIterator<string> {
  for (let i = 0; i < 100; i++) {
    yield i.toString();
  }
}

// do something by three workers for the [0..99] numbers that come from the `generator()`.
const result = await runConcurrent<string, number>(
  3,
  arg => (resolve, reject) => {
    // do something
    resolve(Number(arg));
  },
  generator,
);

// example of the `result`
//    result[0]: [
//       0,  3,  6,  9, 12, 15, 18, 21, 24,
//      27, 30, 33, 36, 39, 42, 45, 48, 51,
//      54, 57, 60, 63, 66, 69, 72, 75, 78,
//      81, 84, 87, 90, 93, 96, 99
//    ]
//
//    result[1]: [
//       1,  4,  7, 10, 13, 16, 19, 22, 25,
//      28, 31, 34, 37, 40, 43, 46, 49, 52,
//      55, 58, 61, 64, 67, 70, 73, 76, 79,
//      82, 85, 88, 91, 94, 97
//    ]
//
//    result[2]: [
//       2,  5,  8, 11, 14, 17, 20, 23, 26,
//      29, 32, 35, 38, 41, 44, 47, 50, 53,
//      56, 59, 62, 65, 68, 71, 74, 77, 80,
//      83, 86, 89, 92, 95, 98
//    ]
```

## Supported Functions

- `async function runConcurrent<T, R>(maxConcurrency: number, executorProvider: (arg: T) => (resolve: (value: R | PromiseLike<R>) => void, reject: (reason?: unknown) => void) => void, generatorFunction: () => IterableIterator<T>): Promise<Awaited<R[][]>>`
- `async function runConcurrentFlatten<T, R>(maxConcurrency: number, executorProvider: (arg: T) => (resolve: (value: R | PromiseLike<R>) => void, reject: (reason?: unknown) => void) => void, generatorFunction: () => IterableIterator<T>): Promise<Awaited<R[]>>`
- `async function runConcurrentSettled<T, R>(maxConcurrency: number, executorProvider: (arg: T) => (resolve: (value: R | PromiseLike<R>) => void, reject: (reason?: unknown) => void) => void, generatorFunction: () => IterableIterator<T>): Promise<PromiseSettledResult<R[]>[]>`

Please see also [typedoc](https://moznion.github.io/limited-concurrent-workers-js/).

## Author

moznion (<moznion@mail.moznion.net>)
npm package: @moznion/miniq
Description: A minimal in-process queue system for TypeScript/JavaScript.
Author: moznion
Latest version: 0.0.1

# miniq [![.github/workflows/check.yml](https://github.com/moznion/miniq/actions/workflows/check.yml/badge.svg)](https://github.com/moznion/miniq/actions/workflows/check.yml) [![codecov](https://codecov.io/gh/moznion/miniq/branch/main/graph/badge.svg?token=IXK4KN1VR9)](https://codecov.io/gh/moznion/miniq)

A minimal in-process queue system for TypeScript/JavaScript that supports TTL mechanism.

## Synopsis

```ts
let i = 0;
const queueTaskRunner = new QueueTaskRunner<number>();

const task1 = await Task.make<number>(async (): Promise<number> => {
  return new Promise<number>(resolve => {
    setTimeout(() => {
      resolve(++i);
    }, 500);
  });
});
const task2 = await Task.make<number>(async (): Promise<number> => {
  return new Promise<number>(resolve => {
    resolve(++i);
  });
});
const task3 = await Task.make<number>(async (): Promise<number> => {
  return new Promise<number>(resolve => {
    resolve(++i);
  });
});

queueTaskRunner.enqueue(task1); // runner runs task1, and the task takes 500ms
queueTaskRunner.enqueue(task2); // runner queues task2 and defer it after task1
queueTaskRunner.enqueue(task3); // runner queues task3 and defer it after task2

console.log(await task1.getResult()); // => 1
console.log(await task2.getResult()); // => 2
console.log(await task3.getResult()); // => 3
```

## Description

`QueueTaskRunner#enqueue(task: Task<T>)` receives a task and appends that task to the queue and runs the tasks in a queue
from the beginning of the queue.

`Task<T>` represents the task that you wanted to do according to the FIFO, and the task runner executes the enqueued
task's `async do(): Promise<void>`.
The point is this `do()` returns the `Promise<void>` so the client code cannot get the result of the actual procedure,
but you can use `async Task#getResult(): Promise<T>` to take that.
So the basic usage should be enqueuing a task and waiting for the result by `await getResult()` for the task.

Please see also [typedoc](https://moznion.github.io/miniq/).

### TTL

You can give a task the TTL like:

```ts
const task = await Task.make<string>(async (): Promise<string> => {
  return 'foo';
}, Date.now() + 60000);
// ~~~~~~~~~~~~~~~~~~ TTL that represents 60 secs from now

...

await task.getResult(); // if the TTL has exceeded, it rejects this task and throws `TaskTTLExceededError`.
```

And a task that has the TTL has been enqueued and when the task runner takes the task to run, if the TTL exceeds
the current timestamp at that moment, it doesn't run that task and it rejects the task with `TaskTTLExceededError`.

## LISENCE

MIT
npm package: @mozyun/formily-tpl
Description: > Formily 桥接组件库生态脚手架
Latest version: 1.1.11

# @formily/template

> Formily 桥接组件库生态脚手架

## 安装

```bash
npm install -g ts-node @formily/template
```

## 初始化

先 cd 到你需要初始化的项目目录，执行以下命令

```bash
npx formily-tpl init
```

## 构建

```bash
formily-tpl build
```

## 构建配置

在包根路径上创建，builder.config.ts 文件

```ts
import { IBuilderConfig } from '@formily/template'

export const BuilderConfig: IBuilderConfig = {
  externals: {},
  //当前仓库核心依赖的三方组件库名称
  targetLibName: 'antd',
  //核心三方库cjs目录名
  targetLibCjsDir: 'lib',
  //核心三方库es目录名
  targetLibEsDir: 'es',
  //是否打包全量类型文件
  bundleDts: false,
}
```