open-index/open-npm huggingface dataset:
npm package: @opaquejs/testing
Description: Test Suite used by Opaque ORM
Author: Sebastian Dittrich
Latest version: 0.3.0

# Opaque Testing Suite

Write your jest tests in class syntax. The test runner runs every method as a test.

## Example Test

```ts
import { runAsTest } from "@opaquejs/testing";

@runAsTest()
export class SomeTest {
  async testSomething() {
    // Your assertions here...
    expect(somevar).toBe(true);
  }
}
```

Please notice the `@runAsTest()` call. This decorator actually executes your test code.

## Running for Examples

You can use the `@example` and the `@examples` decorators to run a test for each example. You need to have the `emitDecoratorMetadata` option in typescript enabled.

```ts
import { runAsTest, example, examples, Example } from "@opaquejs/testing";

@runAsTest()
export class SomeTest {
  @example("string 1", 1)
  @example("string 2", 2)
  // Is the same as...
  @examples(["string 2", 2], ["string 1", 1])
  async testSomething(str: Example<string>, num: Example<number>) {
    // Your assertions here...
  }
}
```

## Ignoring methods

You can ignore methods using the `@ignore` decorator, or prefixing them with an underscore like this: `_iWillBeIgnored() {}`

```ts
import { runAsTest, ignore } from "@opaquejs/testing";

@runAsTest()
export class SomeTest {
  @ignore()
  async someHelper() {
    // ...
  }

  async _someHelper() {
    // ...
  }
}
```
npm package: @opass/perp-exchange
Description: [![Version](https://img.shields.io/npm/v/@opass/perp-exchange.svg)](https://www.npmjs.com/package/@opass/perp-exchange) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](#)
Latest version: 2.0.0

# Welcome to @opass/perp-exchange
[![Version](https://img.shields.io/npm/v/@opass/perp-exchange.svg)](https://www.npmjs.com/package/@opass/perp-exchange)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](#)

## prerequisites
Only supports ESM import.
CommonJS require is not supported.


## Install

```sh
npm install @opass/perp-exchange
```

## Usage
### basic
``` js
import PerpExchange from "perp-exchange"
// Initialize PerpExchange with TWD and USD amount
const initailTwd = 10000;
const initialUsd = 1000;
const exchange = new PerpExchange(initailTwd, initialUsd);

const usd = exchange.exchangeUsd(6000);  // Get 375 USD by 6000 TWD 
exchange.getReservedTwd();               // 16000
exchange.getReservedUsd();               // 625
```

### exchange rate should base on previous status
``` js
const initialTwd = 10000;
const initialUsd = 1000;
const exchange = new PerpExchange(initialTwd, initialUsd);

const firstTwd = exchange.exchangeTwd(250);   // Get 2000 TWD by 250 USD 
exchange.getReservedTwd();                    // 8000 TWD
exchange.getReservedUsd();                    // 1250 USD

const secondTwd = exchange.exchangeTwd(250);  // Get 1333 TWD by 250 USD 
exchange.getReservedTwd();                    // 6667 TWD
exchange.getReservedUsd();                    // 1500 USD
```

check test to see more usage

## Run tests

```sh
# clone repo and move in project directory
npm install
npm run test
```

## Author

👤 **opass**

***
_This README was generated with ❤️ by [readme-md-generator](https://github.com/kefranabg/readme-md-generator)_
npm package: @opastorello/n8n-nodes-mailtm
Description: n8n community node for integrating with Mail.tm, a disposable email API. Receive and process temporary emails in your workflows.
Author: Nícolas Pastorello
Latest version: 1.0.2

![Banner image](https://user-images.githubusercontent.com/10284570/173569848-c624317f-42b1-45a6-ab09-f0ea3c247648.png)

# n8n-nodes-mailtm

This is an n8n community node. It lets you use Mail.tm in your n8n workflows.

Mail.tm is a free disposable email service with a public API, ideal for testing, automations, and temporary registrations that require email confirmation.

[n8n](https://n8n.io/) is a [fair-code licensed](https://docs.n8n.io/reference/license/) workflow automation platform.

[Installation](#installation)  
[Operations](#operations)  
[Credentials](#credentials)  
[Compatibility](#compatibility)  
[Usage](#usage)  
[Resources](#resources)  
[Version history](#version-history)  

## Installation

Follow the [installation guide](https://docs.n8n.io/integrations/community-nodes/installation/) in the n8n community nodes documentation.

To install in your n8n instance:

```bash
n8n install @opastorello/n8n-nodes-mailtm
```
or

```bash
npm install @opastorello/n8n-nodes-mailtm
```

## Operations

The Mail.tm node supports the following operations:

### Domains
- List all available domains
- Get a domain by ID

### Accounts
- Create a new temporary account
- Authenticate (retrieve JWT token)
- Get account info (by token or by ID)
- Delete account (irreversible)

### Messages
- List all messages (with pagination)
- Get message details by ID
- Delete message
- Mark message as read/unread

### Message Source
- Retrieve full MIME/raw source of a message

### Attachments
- Download attachments from your mailbox

### Trigger Node
- Instantly trigger workflows when a new email arrives in your inbox

## Credentials

You must authenticate with your Mail.tm account to access most API features.

**Set up:**
1. Go to [https://mail.tm](https://mail.tm) and create a temporary email account, or use the node to create one.
2. In n8n, go to **Credentials > New credential** and search for “Mail.tm API”.
3. Enter the email and password of your Mail.tm account.

No API key is required. The node will handle token generation automatically.

## Compatibility

- Requires n8n v1.0.0 or newer.
- Tested with n8n v1.x and v2.x.
- No known incompatibilities.

## Usage

- Add the **Mail.tm** node to your workflow and select the operation you want.
- For automatic reactions to incoming mail, use the **Mail.tm Trigger** node and set the polling interval.
- Attachments are returned as binary data for use in other n8n nodes.
- All API errors are returned as JSON for easy troubleshooting.
- The Mail.tm API does **not** support sending emails (receive-only).

For more on getting started with n8n, see the [Try it out](https://docs.n8n.io/try-it-out/) documentation.

## Resources

* [n8n community nodes documentation](https://docs.n8n.io/integrations/#community-nodes)
* [Mail.tm API documentation](https://docs.mail.tm)

## Version history

- **1.0.0** — Initial release. Supports all main Mail.tm API endpoints and trigger node.