open-index/open-npm huggingface dataset:
npm package: @matvp91/promise-scheduler
Description: Run async code in a synchronous order by scheduling promises, with the possibility to cancel pending or active tasks. Optimized for the browser environment, less then 1KB in file size.
Author: matvp91
Latest version: 1.0.1

# promise-scheduler

Run async code in a synchronous order by scheduling promises, with the possibility to cancel pending or active tasks. Optimized for the browser environment, less then 1KB in file size.

I came across a situation where I needed more fine-grained control over a sequence of async operations, with the added requirement that a single operational task should be abortable. Meaning that the task could abort earlier on in its execution in order for the next task to run. Think of a `fetch` call with an `AbortController` that makes the `Promise` resolve earlier due to the fact that the signal is cancelled along the way, but then in a sequence of multiple fetch calls.

A lot of the existing solutions do not take abortable operations into account, and they do too much for my liking (such as allowing concurrency). This is a lightweight yet limited implementation of a scheduler able to execute async code one after another.

## Install

```
npm install @matpv91/promise-scheduler
```

## API

```javascript
import Scheduler from '@matvp91/promise-scheduler';

const scheduler = new Scheduler();

function createTask() {
  // Dummy function to define performing work over time.
  const work = () => new Promise(resolve => setTimeout(resolve, 500));

  return async (throwIfCanceled) => {
    await work();
    throwIfCanceled(); // Checks whether we can continue or discard the callstack below.
    await work();
    throwIfCanceled();
  };
}

// Schedule a task.
scheduler.scheduleCallback(createTask());

// Schedule a task with notifiers.
scheduler.scheduleCallback(createTask(), {
  onError: (error) => {}, // The task causes an error.
  onAborted: () => {}, // The task got aborted working.
});

// Pending (future) tasks are cancelled, and if a task
// is actively working, it gets aborted.
scheduler.flushWork();

// Returns a promise when no more work is pending.
scheduler.waitForIdle(): Promise
```

## Lifecycle example

The example below illustrates a minimalistic Instance class with a load, unload and destroy lifecycle. The fact that the methods are async poses no risk of an unexpected side effect or race condition due to the fact that they're handled by a scheduler taking care of the order of execution.

```javascript
class Instance {
  load() {
    this.unload();
    scheduler.scheduleCallback(/* an async, abortable task with plenty of work */);
  }

  unload() {
    scheduler.flushWork();
    scheduler.scheduleCallback(/* an async task for cleanup */);
  }

  async destroy() {
    this.unload();
    await scheduler.waitForIdle(); // Ensures no pending work is left.
  }
}
```
npm package: @matwerber/awscdk-constructs
Description: This project is (or at least, is meant to become) a central repository of the various custom AWS CDK constructs I create in the course of my work.
Author: Mat Werber
Latest version: 0.0.1

# Mat Werber's AWS CDK Construct Library

This project is (or at least, is meant to become) a central repository of the various custom AWS CDK constructs I create in the course of my work.

For now, project goals are:

1. Learn how to publish to the CDK Construct Hub

2. Learn to write better constructs.

3. Improve my existing constructs over time rather than re-creating or copy-pasting them when needed across projects.

## Installation

### NodeJS

```sh
npm install @matwerber/awscdk-constructs
```

### Python

```sh
pip install matwerber-awscdk-constructs
```


## FAQ

### How was this project started?

Rather than piece together the various components and decisions needed to publish to the CDK Construct Hub, I opted to use AWS CDK Construct Library template project provided by [projen](https://projen.io/docs/project-types/aws-cdk-construct-library/)


### How does the project get published to Construct Hub?

Commits trigger a GitHub Action to build and publish this library to **npm**.
npm package: @maty21/soccer-lineup
Description: 11 builder is an online tool that allows you to create your own football lineup, customize its look, and download it as a ready-to-share image.
Latest version: 0.3.0

# 11-builder

11 builder is an online tool that allows you to create your own football lineup, customize its look, and download it as a ready-to-share image.

Try it yourself on [11builder.com](https://11builder.com/).

## Usage

| command                         | description                |
|---------------------------------|----------------------------|
| `yarn install` or `npm install` | Install dependencies       |
| `yarn start` or `npm start`     | Start a development server |
| `yarn build` or `npm run build` | Create a new build         |

To serve the `/build` folder:

1. `npm install -g serve` if you don't have the `serve` package
2. `serve -s build`

## Tools used

* [React.js](https://reactjs.org/), boostraped with [create-react-app](https://github.com/facebook/create-react-app)
* [Cheerio](https://github.com/cheeriojs/cheerio) to scrape data from [fifaindex.com](https://www.fifaindex.com/fr/players/) (which was itself scraped from [EA Sport's Ultimate Team database](https://www.easports.com/fifa/ultimate-team/fut/database))
* [Netlify](https://www.netlify.com/) to deploy the app

## Contributing

Pull requests are welcome. Here are a few things that you may want to look into:

* Any security vulnerability
* Use external APIs to provide "Share with X" features, such as Imgur, Twitter, Instagram or Reddit.
* Create an open API to serve the players images and info.
* Move from CSS to Sass or Styled-Components for easier styling.
* Start using React hooks
npm package: @maty21/soccer-linup
Description: 11 builder is an online tool that allows you to create your own football lineup, customize its look, and download it as a ready-to-share image.
Latest version: 0.3.0

# 11-builder

11 builder is an online tool that allows you to create your own football lineup, customize its look, and download it as a ready-to-share image.

Try it yourself on [11builder.com](https://11builder.com/).

## Usage

| command                         | description                |
|---------------------------------|----------------------------|
| `yarn install` or `npm install` | Install dependencies       |
| `yarn start` or `npm start`     | Start a development server |
| `yarn build` or `npm run build` | Create a new build         |

To serve the `/build` folder:

1. `npm install -g serve` if you don't have the `serve` package
2. `serve -s build`

## Tools used

* [React.js](https://reactjs.org/), boostraped with [create-react-app](https://github.com/facebook/create-react-app)
* [Cheerio](https://github.com/cheeriojs/cheerio) to scrape data from [fifaindex.com](https://www.fifaindex.com/fr/players/) (which was itself scraped from [EA Sport's Ultimate Team database](https://www.easports.com/fifa/ultimate-team/fut/database))
* [Netlify](https://www.netlify.com/) to deploy the app

## Contributing

Pull requests are welcome. Here are a few things that you may want to look into:

* Any security vulnerability
* Use external APIs to provide "Share with X" features, such as Imgur, Twitter, Instagram or Reddit.
* Create an open API to serve the players images and info.
* Move from CSS to Sass or Styled-Components for easier styling.
* Start using React hooks
npm package: @matzzdev/helperdb
Description: Helper MongoDB untuk Node.js dengan fitur lengkap dan auto collection
Author: MatzzDev
Latest version: 1.0.0

# 📦 @database/helper

[![npm version](https://img.shields.io/npm/v/@database/helper.svg?color=brightgreen)](https://www.npmjs.com/package/@database/helper)
[![npm downloads](https://img.shields.io/npm/dt/@database/helper.svg?color=blue)](https://www.npmjs.com/package/@database/helper)
[![license](https://img.shields.io/npm/l/@database/helper.svg)](LICENSE)

`@database/helper` adalah **library MongoDB helper** untuk Node.js dan TypeScript yang mempermudah operasi database.  
Cocok untuk **proyek kecil maupun besar**, dengan fitur auto-create collection dan API yang mudah digunakan.

---

## ✨ Fitur
- 🔌 Connect ke MongoDB (Local / Cloud)
- 📂 Auto-create collection jika belum ada
- ➕ Insert satu atau banyak dokumen
- 🔍 Find & FindOne
- 📄 Pagination siap pakai
- ♻️ Update dokumen
- ❌ Delete dokumen
- 🎨 Logger warna-warni di console

---

## 📥 Instalasi
```bash
npm install @database/helper
# atau
yarn add @database/helper


---

⚡ Contoh Penggunaan

1. Import & Connect

import MongoDBHelper from "@database/helper";

const db = new MongoDBHelper("mongodb://localhost:27017", "nama_database");

(async () => {
    await db.connect();

    // Insert contoh data
    await db.insertOne("users", { name: "MatzzDev", role: "Developer" });

    // Ambil semua data
    const users = await db.find("users");
    console.log(users);

    await db.close();
})();


---

2. Insert Banyak Dokumen

await db.insertMany("products", [
    { name: "Laptop", price: 15000000 },
    { name: "Mouse", price: 150000 }
]);

3. Pagination

const pageData = await db.paginate("products", {}, 1, 5);
console.log(pageData);

4. Update

await db.updateOne(
    "users",
    { name: "MatzzDev" },
    { $set: { role: "Fullstack Developer" } }
);

5. Delete

await db.deleteOne("users", { name: "MatzzDev" });


---

🛠 Tips

URI MongoDB bisa menggunakan Local atau MongoDB Atlas.

Semua method otomatis membuat collection jika belum ada.

Gunakan try/catch untuk menangani error.

Kompatibel dengan JavaScript dan TypeScript.



---

📜 Lisensi

MIT License © 2025 MatzzDev

---
npm package: @maucash-repo/maucash
Description: maucash-new
Author: maucash
Latest version: 1.5.10

# maucash

> maucash项目常用组件(基于vue+iview框架)

### 一、安装及配置

```bash
# install dependencies
npm install maucash --save

# main.js中使用插件
import Maucash from 'maucash';
Vue.use(Maucash);
```

### 二、登录组件
* 1、示意图
  ![login](./static/login.png)
* 2、组件使用方式

  ```html
  <maucash-login />
  ```
* 3、关于参数
  * `baseUrl:String` 不同环境下的url地址
  * `imgUrl: String` 图片的url地址
  * `headers:Object` 请求头
  * `isSms:Boolean` 是否显示短信验证码(线下放款不需要)
  * `isLogInfo:Boolean` 登录页面中文字提示(审批系统需要提示)
* 4、事件
  * `loginHandle:Function` 登录获取用户的`token`等参数

### 三、日期范围选择

* 1、示意图
  ![date-picker](./static/date-picker.png)

* 2、使用方式

  ```html
  <date-picker />
  ```

* 3、参数
  * `format: String` 时间显示格式
  * `placeholder: String` 日期选择输入框的文字提示

* 4、事件
  * `confirm-date:Function` 获取选择的时间


### 四、主页图例数据

* 1、使用方式

  ```html
  <maucash-value-count :valueCountArray="valueCountArray" @confirm-date="confirmDate" :title="'Key Statistics'" :format="'dd-MM-yyyy'"/>
  ```

* 2、参数
  * `valueCountArray: Array` 数据
  * `title: String` 标题
  * `format: String` 时间格式

* 3、事件
  * `confirm-date: Function` 用户选择的时间

### 五、弹框组件

* 1、使用方式

  ```html
  <maucash-modal ref="modal" :modalForm="formTop" :rulesForm="rulesForm" @fetchData="fetchData">
    <FormItem label="Name" prop="applyName">
      <Input v-model="formTop.applyName" placeholder="Placeholder loan name" :maxlength="255"></Input>
    </FormItem>
    <FormItem label="Mobile" prop="mobile">
      <Input v-model="formTop.mobile" placeholder="placeholder loan mobile" :maxlength="255"></Input>
    </FormItem>
    <FormItem label="NIK" prop="nik">
      <Input v-model="formTop.nik" placeholder="placeholder nik" :maxlength="255"></Input>
    </FormItem>
  </maucash-modal>
  ```

* 2、参数说明
  * `modalType: String`: 弹框类型(默认`form`,随便传入有别的值下面就会显示取消与确认按钮)
  * `title: String`: 弹框标题
  * `modalForm: Object`: 弹框内表单内容
  * `rulesForm?:Object`: 规则
  * `modelWidth?:Number`: 弹框宽度

* 3、事件
  * `fetchData()`: 点击确认/ok的按钮
npm package: @maugli-sbc/loopback-component-angular-sdk
Description: Loopback angular SDK delivered trough an API endpoint
Author: Lorenzo Kappeler
Latest version: 2.1.0

# loopback-component-angular-sdk
Loopback angualr sdk deliverd over the api

## Configuration

Add the configuration in your `component-config.json`

```
"@joinbox/loopback-component-angular-sdk": {
    "mountPath": "/sdk"
    "cacheOptions": {}
}
```

## Usage

Call the configured endpoint `http://localhost:10100/sdk?=api.example.com` and the loopback SDK will be returned.

### Params

- options: An Object with option for building the SDK (name: default value):
  - ngModuleName: 'lbServices'
  - apiUrl: ${req.headers.host}/${app.get('restApiRoot')} // request-host/api-root-path
  - includeCommonModules: true
  - namespaceModels: false
  - namespaceCommonModels: false
  - namespaceDelimiter: '.'
  - modelsToIgnore: []


### Cache options

See [lru-cache docs](https://github.com/isaacs/node-lru-cache#readme)
npm package: @maugli-sbc/loopback-component-custom-headers
Description: Adds custom headers to loopback responses according to the model configuration
Author: Lorenzo Kappeler
Latest version: 0.1.2

# Loopback Component Custom Headers

Sets cache headers according to the model configuration

Add the following configuration to your model configuration if you want to enable
custom headers.

```
MyModel {
    "options": {
        "setCustomHeaders": true,
        "customHeaders": {
            "Cache-Control": "public, max-age=86400",
            "Vary": "User-Agent"
        }
    }
}
```
Pameters:

* setCustomHeaders: Boolean enables the feature for the given model.
* customHeaders: Object adds all configured headers to the response where the key is the name of the header and the value the header value.
npm package: @maugli-sbc/loopback-postgres-error-handler
Description: Convert postgres error messages for the loopback error handler
Author: Lorenzo Kappeler
Latest version: 1.0.1

# loopback-postgres-error-handler

Convert postgres error messages for the loopback error handler.
Maps the errors `code` property to the configured status

## Usage and configuration

### Installation

`npm i @joinbox/loopback-postgres-error-handler`

### Configuration

Add the following configuration to your middleware config.
Make sure the error handler is included before the strong-error-handler or your
custom error handler. Also make sure you have disabled the rest error handler in the `config.json` file


```
{
    "remoting": {
        "rest": {
            "handleErrors": false
        }
    }
}

```


`middleware.json`

- errorCodeMappings: A key value mapping for postgres error codes and http status codes
Note: The postgres error code must be a String.

```
"final:after": {
        "./../../../index.js": {
            "params": {
                "errorCodeMappings": [
                    ["23000", 406],
                    ["23001", 406],
                    ["23502", 406],
                    ["23503", 406],
                    ["23514", 406],
                    ["23514", 406]
                ]
            }
        },
        "@joinbox/loopback-microservice#errorHandler": {
            "params": {
                "debug": false,
                "log": true,
                "serviceName": "test-service"
            }
        }
    }

```


## Testing

You can run `npm test` to run the integration and unit tests.

You must have a postgres database running with the credentials matching the ones in the `test/support/server/datasources.json` file.
npm package: @mauhieu12/react-latex-tera
Description: React component support render laTeX content
Author: mauhieu12
Latest version: 0.1.2

# react-latex-tera

> Render LaTeX beautifully in React apps!

## Install

```bash
npm install --save mathlive-tera
npm install --save @mauhieu12/react-latex-tera
```

## Usage

```tsx
import Latex from "@mauhieu12/react-latex-tera";
import 'mathlive-tera/static.css'

function Example() {
  return (
    <Latex>We give illustrations for the {1 + 2} processes $e^+e^-$, gluon-gluon and $\\gamma\\gamma \\to W t\\bar b$.</Latex>
  );
}
```

**Note**: `katex` CSS needs to be included in your final bundle. Above example is using `import` to load `css` but depending on how the code & styles are built and bundled, it may be different for your case.

### delimiters

List of delimiters to look for math you can configure it via `delimiters` prop: `<Latex delimiters={[...]}>`

#### A delimiter

```js
{
  left: "A string which starts the math expression (i.e. the left delimiter)"
  right: "A string which ends the math expression (i.e. the right delimiter)"
  display: "A boolean of whether the math in the expression should be rendered in display mode or not"
}
```

#### Default delimiters

```js
[
  { left: '$$', right: '$$', display: true },
  { left: '\\(', right: '\\)', display: false },
  { left: '$', right: '$', display: false },
  { left: '\\[', right: '\\]', display: true },
]
```

### strict

It renders by default non-strict which means it falls back to raw text (without delimiters) in case of error.
You can enable strict mode like below, which will throw the error instead.

```jsx
<Latex strict>{textWithSomeBrokenLatex}</Latex>
```

## License


MIT © [mauhieu12](https://github.com/mauhieu12)
npm package: @mauhr87/platzom
Description: Traductor de idioma platzom
Author: Mauricio Hidalgo
Latest version: 0.1.0

# Platzom

Platzom es un idioma inventado para el [Curso de Fundamentos de Javascript](https://platzi.com/js) de [Platzi](https://platzi.com), el mejor lugar de educacion online

## Descripcion del idioma

- Si la palabra termina en "ar", se le quitan esos dos caracteres.
- Si la palabra inicia con Z, se le añade "pe" al final.
- Si la traducción tiene mas de 10 letras, dividir la palabra a la mitad y unir con un "-".
- Por ultimo, si la palabra original es un palíndromo ninguna regla anterior cuenta y se devuelve la misma palabra intercalando mayusculas y minusculas.

## Instalacion

```
npm install platzom
```

## Uso

```
import platzom from 'platzom'
platzon('Programar') //Program
platzon('Zorro') //Zorrope
platzon('Zarpar') //Zarppe
platzon('Abecedario') //Abece-dario
platzon('sometemos') //SoMeTeMoS
```

## Creditos

- [Mauricio Hidalgo](https://www.facebook.com/mauricio.hidr)

## Licencia

[MIT](https://opensource.org/licenses/MIT)
npm package: @mauicon/ngx-cron-editor
Description: A cron expression generator for Angular 9+
Latest version: 0.4.21

Angular Material Design Cron Editor
===

A library that helps the user graphically build a CRON expression using Angular 9+. 

This library has a long history. It is a fork of the  vincentjames501's [angular-cron-gen](https://github.com/vincentjames501/angular-cron-gen) 
for AngularJS 1.5+ and claudiuconstantin's [cron-editor(https://github.com/claudiuconstantin/cron-editor)] to create an Angular 9+, Material design
editor.

![screenshot](docs/screenshot.png)

To run the sample app just run `npm run start` and go to `http://localhost:4444/`. The app will automatically reload if you change any of the source files.

This library is published to NPM and Github as: `@zapinfo/ngx-cron-editor`

## Demo

A work-in-progress demo can be found [here](https://esarmientoe.github.io/cron-editor/)

## Usage

1. Install the npm package:
    ```
    $ npm i @zapinfo/ngx-cron-editor -S
    ```

2. Import the module in your own module:

    ```ts
    import { CronEditorModule } from '@zapinfo/ngx-cron-editor';

    @NgModule({
        imports: [..., CronEditorModule],
    ...
    })
    export class MyModule {
    }
    ```

3. Use the component in your html code:

    ```html
    <cron-editor [(cron)]="cronExpression"></cron-editor>
    ```

4. That's it, you're done!

## Options

```html
<cron-editor [(cron)]="cronExpression" [options]="cronOptions"></cron-editor>
```

```ts
import { CronOptions } from "@zapinfo/ngx-cron-editor";

@Component({
    ...
})
export class MyComponent {
   public cronOptions: CronOptions = {
       formInputClass: 'form-control cron-editor-input',
       formSelectClass: 'form-control cron-editor-select',
       formRadioClass: 'cron-editor-radio',
       formCheckboxClass: 'cron-editor-checkbox',
       
       defaultTime: "00:00:00",

       hideMinutesTab: false,
       hideHourlyTab: false,
       hideDailyTab: false,
       hideWeeklyTab: false,
       hideMonthlyTab: false,
       hideYearlyTab: false,
       hideAdvancedTab: true,
       hideSpecificWeekDayTab : false,
       hideSpecificMonthWeekTab : false,

       use24HourTime: true,
       hideSeconds: false,

       cronFlavor: CronFlavor.quartz
    };
}
```

## ZapInfo Developer Notes

Internally, we use github for package management.

To pubish, [first login](https://help.github.com/en/articles/configuring-npm-for-use-with-github-package-registry#authenticating-to-github-package-registry) (requires personal access token):

```
npm login --registry=https://npm.pkg.github.com/
```

Then publish the package:

```
npm publish
```

## License:

Licensed under the MIT license