open-index/open-npm huggingface dataset:
npm package: @sign-global/tokentable-core
Description: Core utilities and functions for the TokenTable SDK.
Latest version: 1.14.1

# TokenTable Core Package

Core utilities and functions for the TokenTable SDK.

## Development

### Testing

This package uses [Vitest](https://vitest.dev/) for testing.

#### Running Tests

```bash
# Run tests once
pnpm test:run

# Run tests in watch mode
pnpm test

# Run tests with UI
pnpm vitest --ui
```

#### Test Structure

Tests are located in `src/**/__tests__/` directories following the pattern `*.test.ts`.

#### Current Test Coverage

- `getOrCreateAssociatedTokenAccount` - Comprehensive tests for Solana associated token account creation
  - Tests existing account retrieval
  - Tests new account creation when account doesn't exist
  - Tests error handling for invalid mint/owner
  - Tests custom parameter handling
  - Tests unexpected error propagation

### Building

```bash
# Build the package
pnpm build

# Build in watch mode
pnpm build:watch
```

### Cleaning

```bash
# Clean build artifacts
pnpm clean
```

## Testing Philosophy

The tests use comprehensive mocking to isolate the unit under test while ensuring all code paths are covered. Key testing principles:

1. **Isolation**: External dependencies are mocked to focus on the function logic
2. **Coverage**: All branches and error conditions are tested
3. **Realistic Data**: Valid Solana public keys and realistic mock data are used
4. **Error Handling**: Both expected and unexpected errors are tested

## Dependencies

This package depends on:
- `@solana/web3.js` - Solana blockchain interaction
- `@solana/spl-token` - SPL Token program utilities
- Various other blockchain and utility libraries

Dev dependencies include:
- `vitest` - Testing framework
- `jsdom` - DOM environment for tests
npm package: @sign-mt/browsermt
Description: browsermt inference code
Author: sign.mt ltd
Latest version: 0.2.3

# `sign`/browsermt

Based on https://github.com/gjuchault/typescript-library-starter

This library is designed as a drop-in to run Bergamot models in the browser.

## Installation

```
npm install @sign-mt/browsermt
```

## Usage

```ts
import { createBergamotWorker } from "@sign-mt/browsermt";
// OR import {createBergamotWorker} from 'https://unpkg.com/@sign-mt/browsermt@0.0.2/build/bundled/index.js'

const worker = createBergamotWorker(
  "/node_modules/@sign-mt/browsermt/build/esm/worker.js"
);
// OR createBergamotWorker('https://unpkg.com/@sign-mt/browsermt@0.0.2/build/bundled/worker.js')

// Copy these artifacts to your deployed folder
await worker.importBergamotWorker(
  "browsermt/bergamot-translator-worker.js",
  "browsermt/bergamot-translator-worker.wasm"
);

// Create object with URLs to the model files
const modelRegistry = {
  enru: {
    model: { name: "/models/enru/model.enru.intgemm.alphas.bin" },
    lex: { name: "/models/enru/lex.50.50.enru.s2t.bin" },
    vocab: { name: "/models/enru/vocab.enru.spm" },
  },
};

await worker.loadModel("en", "ru", modelRegistry);

const translations = await worker.translate(
  "en",
  "ru",
  ["test sentence", "other sentence"],
  [{ isHtml: false }, { isHtml: false }]
);
console.log(translations);
```