open-index/open-npm huggingface dataset:
npm package: @hplustime/geohash-rs-wasm
Description: Wraps the geohash-rs crate, with a few judicious additions:
Author: Nicholas Roberts
Latest version: 0.1.1-alpha1

# geohash-rs-wasm

Wraps the geohash-rs crate, with a few judicious additions:

* Vectorized versions of the string form decode and encode with one-copy passing
* Integer form decode and encode methods (also vectorized)
* Vectorized round-trip string->int encoding/decoding (i.e. 'wxy321' -> 3465345221n)

NB: there is a small amount of unsafe code in the vectorized methods, involving pointer dereferencing.

Roadmap:
- [x] decode_int, encode_int for u32, u64 variants (vectorized)
- [] decode, encode for u32, u64 variants (vectorized)
- [] simd optimizations
- [] wasm feature fallbacks/multiple targets
- [] passthrough upstream non-vectorized methods
- [] expand environment targets
npm package: @hpns47/webhook-engine
Description: A flexible webhook processing library supporting NestJS, Express, and Fastify
Author: hpns47
Latest version: 1.0.0

# Webhook Engine

A flexible webhook processing library supporting NestJS, Express, and Fastify.

[![NPM Version](https://img.shields.io/npm/v/@webhook-engine/core.svg)](https://www.npmjs.com/package/@webhook-engine/core)
[![License](https://img.shields.io/npm/l/@webhook-engine/core.svg)](./LICENSE)

## Features

- Core engine for webhook handling
- Multiple storage backends (Postgres, MongoDB, MySQL, Redis)
- Validation and automatic retries
- Framework adapters (NestJS, Express, Fastify)
- Built with TypeScript
- Full type safety

## Installation

```bash
npm install @webhook-engine/core
```

### Scoped Import Exports

```bash
# Only core engine
npm install @webhook-engine/core

# Or import specific modules
import { WebhookEngine, WebhookRegistry } from '@webhook-engine/core/core';
import { WebhookModule } from '@webhook-engine/core/nest';
```

## Usage

### Core Setup
```typescript
import { WebhookRegistry, WebhookEngine, HmacVerifier } from './core';

const registry = new WebhookRegistry();
registry.register('payment.created', async (ctx) => {
  console.log('Payment:', ctx.payload);
});

const verifier = new HmacVerifier('secret');
const engine = new WebhookEngine(registry, verifier);
```

### NestJS
```typescript
import { WebhookModule } from './nest';

@Module({
  imports: [
    WebhookModule.forRoot({
      storage: 'postgres',
      events: { 'payment.created': handler },
    }),
  ],
})
export class AppModule {}
```

### Express
```typescript
import express from 'express';
import { createWebhookMiddleware } from './express/webhook-middleware';
import { PostgresWebhookStorage } from './nest/persistence/postgres-webhook-storage';

const app = express();
app.use(express.json({ verify: (req, res, buf) => { (req as any).rawBody = buf; } }));

const storage = new PostgresWebhookStorage(); // Configure DB
const middleware = createWebhookMiddleware({ 
  engine, 
  storage, 
  validation: { validate: (p) => !!p.id },
  retry: { maxAttempts: 3 }
});
app.post('/webhook', middleware);

app.listen(3000);
```

### Fastify
```typescript
import fastify from 'fastify';
import { webhookPlugin } from './fastify/webhook-plugin';

const app = fastify();
app.register(require('@fastify/express')); // For rawBody
app.register(webhookPlugin, { 
  engine, 
  storage, 
  validation: { validate: (p) => !!p.id },
  retry: { maxAttempts: 3 }
});

app.listen(3000);
```

## Examples

Run the example apps:

```bash
# Express
npx ts-node examples/express-app.ts

# Fastify
npx ts-node examples/fastify-app.ts

# NestJS (existing)
npm run start:dev
```

## Testing

Run tests:
```bash
npm test
```

Coverage:
```bash
npm run test:cov
```