open-index/open-npm huggingface dataset:
npm package: @sasidakh/memoizer
Description: A simple memoizer
Author: Akhil Sasidharan
Latest version: 1.0.0

# memoizer

I was looking for a memoizer that can cache the values of a recursive
fibonacci series while it is executing.

I found that specific solutions exists by passing a cache object to
the recursive function and using it in the immplementation but nothing
generic exists. This is my attempt at writing one.

## Usage:

```js
// the fibonacci series using recursion.
const fib = (n) => n > 1 ? fib(n - 1) + fib(n - 2) : n;
const fibMemo = memoize(fib);
fibMemo(40); // run the test file to see benchmarks
```

## To get benchmarks and a more than trivial test, run :
```js
npm test
```
npm package: @sasikumart/compression-instrumentation
Description: OpenTelemetry instrumentation for Node.js zlib to measure gzip compression latency and performance.
Author: SasiKumar Thangavel
Latest version: 1.0.2

# @sasikumart/compression-instrumentation
OpenTelemetry instrumentation for Node.js `zlib` that measures gzip compression latency in Express compression middleware pipelines.

## Why

The Express [`compression`](https://www.npmjs.com/package/compression) middleware uses `zlib.createGzip` internally, but provides no built-in observability. In production it is hard to answer:

- How much latency does gzip add to API responses?
- Are large payloads causing disproportionate compression overhead?
- Is a spike in response time caused by compression or application logic?

This library patches `zlib.createGzip` to emit an OpenTelemetry span for every compression operation, so compression latency is visible in your distributed traces alongside the rest of the request lifecycle.

## Installation

```bash
npm install @sasikumart/compression-instrumentation
```

## Usage

Register the instrumentation **before** importing `express` or `compression`.

```ts
import { ZlibInstrumentation } from '@sasikumart/compression-instrumentation';
import { NodeTracerProvider } from '@opentelemetry/sdk-trace-node';

const provider = new NodeTracerProvider();
provider.register();

const instrumentation = new ZlibInstrumentation({ enabled: true });
instrumentation.enable();

// Import express and compression only after instrumentation is set up
import express from 'express';
import compression from 'compression';

const app = express();
app.use(compression());
```

## Spans

Each `zlib.createGzip` call produces a span named `zlib.createGzip` with kind `INTERNAL`.

| Attribute | Type | Description |
|---|---|---|
| `zlib.status` | `string` | `"completed"` on success, `"error"` on failure |
| `zlib.error.message` | `string` | Error message (only present on failure) |

On error, an `exception` event is also recorded on the span and the span status is set to `ERROR`.

## Requirements

- Node.js 14+
- `@opentelemetry/api` ^1.9.0

## Development

```bash
npm install
npm test        # run tests with mocha
npm run build   # compile TypeScript to dist/
npm run lint    # lint with Biome
```

## License

MIT — [SasiKumar Thangavel](https://github.com/Sasikumar3096)
npm package: @sasikumart/mongoose-hydrate-instrumentation
Description: Instrumentation plugin for Mongoose hydration lifecycle for OTEL
Author: SasiKumar Thangavel
Latest version: 1.0.0

# mongoose-hydrate-instrumentation

OpenTelemetry instrumentation for the Mongoose hydration lifecycle.

---

## The problem

Most Mongoose/MongoDB OTEL plugins trace at the query level — `find`, `insert`, `update`, and so on. That's useful, but it leaves out something that can quietly eat into your response times: **document hydration**.

Hydration is what happens after the query — Mongoose taking raw BSON/JSON results and turning them into full `Document` instances with virtuals, getters, subdocuments, and everything else. On large result sets or complex schemas, this cost adds up and is otherwise invisible in your traces.

This plugin patches that part of the lifecycle so those spans actually show up.

---

## Requirements

- Node.js >= 16
- Mongoose >= 6.x
- `@opentelemetry/api` >= 1.x

---

## Installation

```bash
npm install mongoose-hydrate-instrumentation
```

---

## Usage

Register the instrumentation before your Mongoose models are loaded, alongside the rest of your OTEL setup.

### With the Node SDK

```typescript
import { NodeSDK } from '@opentelemetry/sdk-node';
import { MongooseHydrateInstrumentation } from 'mongoose-hydrate-instrumentation';

const sdk = new NodeSDK({
  instrumentations: [new MongooseHydrateInstrumentation()],
});

sdk.start();
```

### Manual

```typescript
import { MongooseHydrateInstrumentation } from 'mongoose-hydrate-instrumentation';

const instrumentation = new MongooseHydrateInstrumentation();
instrumentation.enable();
```

### Via `registerInstrumentations`

```typescript
import { registerInstrumentations } from '@opentelemetry/instrumentation';
import { MongooseHydrateInstrumentation } from 'mongoose-hydrate-instrumentation';

registerInstrumentations({
  instrumentations: [new MongooseHydrateInstrumentation()],
});
```

---

## Spans

| Span | Description |
|---|---|
| `mongoose.document.init` | Wraps new Document initialization from raw data |

## Development

```bash
git clone https://github.com/Sasikumar3096/mongoose-hydrate-instrumentation.git
cd mongoose-hydrate-instrumentation
npm install
npm test
npm run build
```

Linting and formatting use [Biome](https://biomejs.dev/):

```bash
npx biome check .
npx biome format --write .
```

---

## Related

- [@opentelemetry/instrumentation-mongoose](https://github.com/open-telemetry/opentelemetry-js-contrib/tree/main/plugins/node/opentelemetry-instrumentation-mongoose) — the official plugin, if you need query-level tracing
- [OpenTelemetry JS Contrib](https://github.com/open-telemetry/opentelemetry-js-contrib)

---

## License

[MIT](LICENSE)
npm package: @sasiru/gpodder
Description: gpodder sdk for typescript developers
Author: Sasiru Ravihansa
Latest version: 0.0.2

# @sasiru/gpodder

[![npm version](https://img.shields.io/npm/v/@sasiru/gpodder?color=blue&style=flat-square)](https://www.npmjs.com/package/@sasiru/gpodder)
[![license](https://img.shields.io/npm/l/@sasiru/gpodder?style=flat-square)](./LICENSE)
[![build](https://img.shields.io/github/actions/workflow/status/sasiru/gpodder-ts-sdk/ci.yml?branch=main&style=flat-square)](https://github.com/sasirura/gpodder)

A modern TypeScript SDK for [gpodder.net](https://gpodder.net) API v2.11.

Supports public podcast discovery and authenticated subscription management via username/password login. Works in Node.js and modern bundlers.

---

## ✨ Features

- 📡 Access **top podcasts**, search, and podcast metadata
- 🔐 Login with `username` + `password`
- 🔄 Manage device subscriptions: upload, get, and delta
- 💅 Fully typed and tree-shakeable ESM output
- ⚡ Lightweight and dependency-free

---

## 📦 Installation

```bash
npm install @sasiru/gpodder
# or
yarn add @sasiru/gpodder
```

🚀 Quick Start
Import
```ts
import { login } from '@sasiru/gpodder'

Authenticate and get a client

const { client } = await login({
  username: 'my-username',
  password: 'my-password',
})
```