open-index/open-npm huggingface dataset:
npm package: @platohq/nestjs-analytics
Description: The NestJS module for Segment based on the official analytics-node package
Latest version: 0.0.3

# @platohq/nestjs-analytics

The NestJS module for Segment based on the official analytics-node package

## How to install

```
npm install @platohq/nestjs-analytics
```

or

```
yarn add @platohq/nestjs-analytics
```

## How to use

**Register the module**

```
import { AnalyticsModule } from '@platohq/nestjs-analytics';

@Module({
  imports: [
    AnalyticsModule.register({
      writeKey: 'YOUR_WRITE_KEY',
    }),
  ],
})
export class AppModule {}
```

**Inject the service**

```
import { AnalyticsService } from '@platohq/nestjs-analytics';

@Injectable()
export class AppService {
  constructor(private readonly analyticsService: AnalyticsService) {}

  track() {
    this.analyticsService.track('MY_EVENT');
  }
}
```

## Async options

Quite often you might want to asynchronously pass your module options instead of passing them beforehand. In such case, use `registerAsync()` method, that provides a couple of various ways to deal with async data.

### Use factory

```
AnalyticsModule.registerAsync({
  useFactory: () => ({
    writeKey: 'YOUR_WRITE_KEY',
  }),
});
```

### Use class

```
AnalyticsModule.registerAsync({
  useClass: AnalyticsConfigService,
});
```

Above construction will instantiate `AnalyticsConfigService` inside `AnalyticsModule` and will leverage it to create options object.

```
class AnalyticsConfigService implements AnalyticsOptionsFactory {
  createAnalyticsOptions(): AnalyticsModuleOptions {
    return {
      writeKey: 'YOUR_WRITE_KEY',
    };
  }
}
```

### Use existing

```
AnalyticsModule.registerAsync({
  imports: [ConfigModule],
  useExisting: ConfigService,
}),
```
npm package: @platohq/nestjs-clearbit
Description: The NestJS module based on the official Clearbit package
Latest version: 0.0.3

# @platohq/nestjs-clearbit

The NestJS module based on the official Clearbit package

## How to install

```
npm install @platohq/nestjs-clearbit
```

or

```
yarn add @platohq/nestjs-clearbit
```

## How to use

**Register the module**

```
import { ClearbitModule } from '@platohq/nestjs-clearbit';

@Module({
  imports: [
    ClearbitModule.register({
      apiKey: 'YOUR_WRITE_KEY',
    }),
  ],
})
export class AppModule {}
```

**Inject the service**

```
import { ClearbitService } from '@platohq/nestjs-clearbit';

@Injectable()
export class AppService {
  constructor(private readonly clearbitService: ClearbitService) {}

  track() {
    this.clearbitService.track('MY_EVENT');
  }
}
```

## Async options

Quite often you might want to asynchronously pass your module options instead of passing them beforehand. In such case, use `registerAsync()` method, that provides a couple of various ways to deal with async data.

### Use factory

```
ClearbitModule.registerAsync({
  useFactory: () => ({
    apiKey: 'YOUR_WRITE_KEY',
  }),
});
```

### Use class

```
ClearbitModule.registerAsync({
  useClass: ClearbitConfigService,
});
```

Above construction will instantiate `ClearbitConfigService` inside `ClearbitModule` and will leverage it to create options object.

```
class ClearbitConfigService implements ClearbitOptionsFactory {
  createClearbitOptions(): ClearbitModuleOptions {
    return {
      apiKey: 'YOUR_WRITE_KEY',
    };
  }
}
```

### Use existing

```
ClearbitModule.registerAsync({
  imports: [ConfigModule],
  useExisting: ConfigService,
}),
```
npm package: @platohq/nestjs-google-storage
Description: Description
Latest version: 0.0.3

# @platohq/nestjs-google-storage

Description

## How to install

```bash
npm install @platohq/nestjs-google-storage
```

or

```bash
yarn add @platohq/nestjs-google-storage
```

## How to use

**Register the module**

```typescript
import { GoogleStorageModule } from '@platohq/nestjs-google-storage';

@Module({
  imports: [
    GoogleStorageModule.register({
      defaultBucketname: GOOGLE_STORAGE_BUCKET_HERE,
      projectId: GOOGLE_PROJECT_ID_HERE,
      keyFilename: GOOGLE_APPLICATION_CREDENTIALS_PATH_HERE,
    })
  ],
})
export class AppModule {
}
```
npm package: @platohq/nestjs-imagekit
Description: The NestJS module based on the official Imagekit package
Latest version: 0.0.3

# @platohq/nestjs-imagekit

The NestJS module based on the official Imagekit package

## How to install

```
npm install @platohq/nestjs-imagekit
```

or

```
yarn add @platohq/nestjs-imagekit
```

## How to use

**Register the module**

```
import { ImagekitModule } from '@platohq/nestjs-imagekit';

@Module({
  imports: [
    ImagekitModule.register({
      privateKey: 'YOUR_PRIVATE_KEY',
      publicKey: 'YOUR_PUBLIC_KEY',
      urlEndpoint: 'YOUR_URL_ENDPOINT',
    }),
  ],
})
export class AppModule {}
```

**Inject the service**

```
import { ImagekitService } from '@platohq/nestjs-imagekit';

@Injectable()
export class AppService {
  constructor(private readonly imagekitService: ImagekitService) {}

  track() {
    this.imagekitService.track('MY_EVENT');
  }
}
```

## Async options

Quite often you might want to asynchronously pass your module options instead of passing them beforehand. In such case, use `registerAsync()` method, that provides a couple of various ways to deal with async data.

### Use factory

```
ImagekitModule.registerAsync({
  useFactory: () => ({
    privateKey: 'YOUR_PRIVATE_KEY',
    publicKey: 'YOUR_PUBLIC_KEY',
    urlEndpoint: 'YOUR_URL_ENDPOINT',
  }),
});
```

### Use class

```
ImagekitModule.registerAsync({
  useClass: ImagekitConfigService,
});
```

Above construction will instantiate `ImagekitConfigService` inside `ImagekitModule` and will leverage it to create options object.

```
class ImagekitConfigService implements ImagekitOptionsFactory {
  createImagekitOptions(): ImagekitModuleOptions {
    return {
      privateKey: 'YOUR_PRIVATE_KEY',
      publicKey: 'YOUR_PUBLIC_KEY',
      urlEndpoint: 'YOUR_URL_ENDPOINT',
    };
  }
}
```

### Use existing

```
ImagekitModule.registerAsync({
  imports: [ConfigModule],
  useExisting: ConfigService,
}),
```
npm package: @platohq/nestjs-openai
Description: The NestJS module for Segment based on the official analytics-node package
Latest version: 0.0.3

# @platohq/nestjs-openai

The NestJS module for OpenAI based on the official openai package

## How to install

```
npm install @platohq/nestjs-openai
```

or

```
yarn add @platohq/nestjs-openai
```

## How to use

**Register the module**

```typescript
import { OpenAIModule } from '@platohq/nestjs-openai';

@Module({
  imports: [
    OpenAIModule.register({
      apiKey: process.env.OPENAI_API_KEY,
    }),
  ],
})
export class AppModule {
}
```

**Inject the service**

```typescript
import { OpenAIClient } from '@platohq/nestjs-openai';

@Injectable()
export class AppService {
  constructor(private readonly openAIClient: OpenAIClient) {
  }

  async createCompletion(prompt: string) {
    const { data } = await this.openAIClient.createCompletion({
      model: 'text-davinci-002',
      max_tokens: 1000,
      temperature: 0.8,
      prompt,
    });
  
    return data;
  }
}
```

## Async options

Quite often you might want to asynchronously pass your module options instead of passing them beforehand. In such case,
use `registerAsync()` method, that provides a couple of various ways to deal with async data.

### Use factory

```typescript
OpenAIModule.registerAsync({
  useFactory: () => ({
    apiKey: process.env.OPENAI_API_KEY,
  }),
});
```
npm package: @platohq/nestjs-sendbird
Description: Sendbird integration for NestJS
Latest version: 0.0.3

# @platohq/nestjs-sendbird

The NestJS module based on the official Sendbird REST APIs

## How to install

```
npm install @platohq/nestjs-sendbird
```

or

```
yarn add @platohq/nestjs-sendbird
```

## How to use

**Register the module**

```typescript
import { SendbirdModule } from '@platohq/nestjs-sendbird';

@Module({
  imports: [
    SendbirdModule.register({
      baseURL: process.env.SENDBIRD_BASE_URL,
      headers: {
        'Api-Token': process.env.SENDBIRD_API_TOKEN,
      },
    }),
  ],
})
export class AppModule {
}
```

**Inject the service**

```typescript
import { SendbirdService } from '@platohq/nestjs-sendbird';

@Injectable()
export class AppService {
  constructor(private readonly sendbirdService: SendbirdService) {
  }

  private async createUser(user: User): Promise<string> {
    const sendbirdAccessToken = await this.sendbirdService.createUser(
      user.id,
      user.fullName,
      user.avatarUrl,
    );

    return sendbirdAccessToken;
  }
}
```

## Async options

Quite often you might want to asynchronously pass your module options instead of passing them beforehand. In such case,
use `registerAsync()` method, that provides a couple of various ways to deal with async data.

### Use factory

```typescript
SendbirdModule.registerAsync({
  useFactory: () => ({
    baseURL: process.env.SENDBIRD_BASE_URL,
    headers: {
      'Api-Token': process.env.SENDBIRD_API_TOKEN,
    }
  }),
});
```
npm package: @platon-swap/uniswap-sdk
Description: 🛠 An SDK for building applications on top of Uniswap V2
Latest version: 0.0.1

# 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/v2-sdk/latest.svg)](https://www.npmjs.com/package/@uniswap/v2-sdk/v/latest)
[![npm bundle size (scoped version)](https://img.shields.io/bundlephobia/minzip/@uniswap/v2-sdk/latest.svg)](https://bundlephobia.com/result?p=@uniswap/v2-sdk@latest)

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

## 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: @platonic-dice/core
Description: Core JavaScript logic for simulating TTRPG dice rolls.
Author: Stephen James Saunders
Latest version: 3.0.2

# @platonic-dice/core

Core JavaScript/TypeScript library providing dice-roll logic, modifiers, and test evaluation for tabletop RPGs.

This package contains the pure logic used by higher-level packages (for example `@platonic-dice/dice`). It exports rolling helpers including `roll`, `rollMod`, `rollTest`, and `rollModTest` (combining modifiers with test evaluation), entities (die types, roll types, outcomes), and utility functions.

## Installation

Install from npm:

```bash
npm install @platonic-dice/core @platonic-dice/types-core
```

## Quick usage

CommonJS:

```js
const {
  roll,
  rollDice,
  rollModTest,
  DieType,
  RollType,
} = require("@platonic-dice/core");

console.log(roll(DieType.D20));
console.log(rollDice(DieType.D6, { count: 3 }));

// New in 2.1.0: rollModTest combines modifiers with test evaluation
const result = rollModTest(DieType.D20, (n) => n + 5, {
  testType: "skill",
  target: 15,
});
console.log(
  `Roll: ${result.base}, Modified: ${result.modified}, Outcome: ${result.outcome}`,
);
```

ESM / TypeScript:

```ts
import { roll, rollModTest, DieType } from "@platonic-dice/core";
console.log(roll(DieType.D20));

// Combine modifiers with test evaluation
const result = rollModTest(DieType.D20, (n) => n + 5, {
  testType: "at_least",
  target: 15,
});
```

## Build & Test

This package's sources live under `src/`. To run tests or build from the monorepo root:

```bash
# from repo root
npm run build
npm test
```

Or run package-local scripts:

```bash
cd packages/core
# run unit tests
npm test
```

### Type Testing

Type definitions are provided by the separate `@platonic-dice/types-core` package. To test the type surface:

```bash
cd packages/types-core
pnpm run test:types
```

## Examples

The `examples/` directory contains comprehensive examples for all major functions. Run them to see the library in action:

```bash
# Run all core examples (roll, rollDice, rollMod, rollDiceMod, rollTest, rollModTest)
npm run examples

# Run all examples including advanced features and analysis functions
npm run examples:all

# Run individual example files
npm run examples:roll
npm run examples:rollDice
npm run examples:rollMod
npm run examples:rollDiceMod
npm run examples:rollTest
npm run examples:rollModTest
npm run examples:rollModTest:advanced
npm run examples:analyseTest
npm run examples:analyseModTest
npm run examples:entities
```

Each example demonstrates practical usage patterns and outputs results to help you understand the API.

## Contributing

See the repository root `README.md` for contribution guidelines. Keep changes backwards-compatible where possible and include tests.

## License

MIT — see the repository `LICENSE` file.
npm package: @platonic-dice/dice
Description: Persistent dice objects with roll history and TypeScript support.
Author: Stephen James Saunders
Latest version: 2.3.2

# @platonic-dice/dice

Persistent dice objects with roll history and TypeScript support. This package builds on top of `@platonic-dice/core` and provides classes such as `Die` which maintain roll history, validators, and utilities for consuming applications.

Version 2.1.0 adds support for `rollModTest()` - combining modifiers with test evaluation in a single method call.

## Installation

```bash
npm install @platonic-dice/dice
```

## Usage

CommonJS:

```js
const { Die } = require("@platonic-dice/dice");
const { DieType } = require("@platonic-dice/core");

const d20 = new Die(DieType.D20);
console.log(d20.roll());
console.log(d20.history("normal"));

// New in 2.1.0: rollModTest combines modifier and test evaluation
const result = d20.rollModTest((n) => n + 5, { testType: "skill", target: 15 });
console.log(`Modified result: ${result}`);
console.log(d20.history("modifiedTest"));
```

TypeScript:

```ts
import { Die } from "@platonic-dice/dice";
import { DieType } from "@platonic-dice/core";

const d20 = new Die(DieType.D20);
console.log(d20.roll());

// Apply modifier and evaluate against test conditions
const result = d20.rollModTest((n) => n + 5, {
  testType: "at_least",
  target: 15,
});
```

## Build

This package is written in TypeScript and compiles to `dist/`.

```bash
cd packages/dice
npm run build
```

## Notes on publishing

- This package depends on `@platonic-dice/core`. When publishing both packages in the same release, ensure both `package.json` versions are bumped to the same release tag (the repository's release workflow can publish matching versions automatically).
- The package is scoped (`@platonic-dice/dice`) — make sure the npm scope exists for your account or organization before publishing.

## License

MIT — see the repository `LICENSE` file.
npm package: @platonic-dice/types-core
Description: Type definitions for @platonic-dice/core
Author: Stephen James Saunders
Latest version: 3.0.2

# @platonic-dice/types-core

Type definitions for @platonic-dice/core.

This package provides the TypeScript surface for the pure JS core package.

Install alongside the runtime package:

```bash
pnpm add @platonic-dice/core @platonic-dice/types-core
```

## Type Testing

This package includes type tests using `tsd` to validate the public API surface:

```bash
cd packages/types-core
pnpm run test:types
```

The tests verify that:

- All exported functions have correct signatures
- Type inference works as expected
- Invalid usage is properly rejected by TypeScript