open-index/open-npm huggingface dataset:
npm package: @ramkrishna-js/framecard
Description: 🎨 A beautiful and fast music card generator for Discord bots.
Author: Ramkrishna
Latest version: 1.0.0

# @ramkrishna-js/framecard

🎨 A beautiful, fast, and highly customizable music card generator for Discord bots.

## Features

- ✨ **Sleek Design**: Modern floating card aesthetic inspired by popular music players.
- ⚡ **High Performance**: Built with `@napi-rs/canvas` for extremely fast image generation.
- 🌈 **Customizable**: Change colors, thumbnails, titles, authors, and progress.
- 🛠️ **Easy to Use**: Simple and intuitive builder pattern.

## Installation

```bash
npm install @ramkrishna-js/framecard
```

## Usage

```typescript
import { ClassicCard } from '@ramkrishna-js/framecard';
import fs from 'fs';

const card = new ClassicCard()
    .setTitle('Never Gonna Give You Up')
    .setAuthor('Rick Astley')
    .setThumbnail('https://img.youtube.com/vi/dQw4w9WgXcQ/hqdefault.jpg')
    .setColor('#ff0000') // Custom theme color
    .setProgress(50)     // Progress in percentage
    .setStartTime('1:45')
    .setEndTime('3:32');

const buffer = await card.build();
fs.writeFileSync('card.png', buffer);
```

## Preview

The generated card features a blurred background, a rounded thumbnail with shadow, and a sleek progress bar with a glow effect and knob.

## License

MIT © [Ramkrishna](https://github.com/ramkrishna-js)
npm package: @ramkrishna-js/streaming-sdk
Description: The ultimate Node.js/TypeScript SDK for TMDB. High-performance, dual-stack (ESM/CJS) support, featuring intelligent media utilities, auto-pagination, and customizable caching.
Author: ramkrishna-js
Latest version: 1.1.0

# @ramkrishna-js/streaming-sdk

The ultimate Node.js/TypeScript SDK for The Movie Database (TMDB). High-performance, dual-stack (ESM/CJS) support, featuring intelligent media utilities, auto-pagination, and customizable caching. Designed for building enterprise-grade media applications.

## Features

- **TypeScript Support:** Full type definitions for a better developer experience.
- **Dual-Stack:** Supports both CommonJS (`require`) and ESM (`import`).
- **Flexible Caching:** Built-in `node-cache` or provide your own custom cache store (e.g., Redis).
- **Image Helper:** Easy URL generation for movie posters and backdrops.
- **Global Localization:** Support for language parameters on all requests.

## Installation

```bash
npm install @ramkrishna-js/streaming-sdk
```

## Usage (CommonJS)

```javascript
const { createClient } = require('@ramkrishna-js/streaming-sdk');

const sdk = createClient('YOUR_TMDB_API_KEY');
```

## Usage (ESM / TypeScript)

```typescript
import { createClient } from '@ramkrishna-js/streaming-sdk';

const sdk = createClient('YOUR_TMDB_API_KEY', {
  cacheTTL: 600
});

// Image Helper usage
const posterUrl = sdk.images.getUrl('/path_to_poster.jpg', 'w500');

// Extract YouTube Trailer
const movie = await sdk.movies.getDetails(268);
const trailerUrl = sdk.utils.getYouTubeTrailer(movie.videos.results);

// Auto-Pagination (Fetch first 3 pages of popular movies)
const top60 = await sdk.utils.paginate(sdk.movies.getPopular, [], 3);
```

## Custom Cache Store

You can provide your own cache implementation (e.g., for Redis integration):

```javascript
const sdk = createClient('KEY', {
  cache: {
    get: async (key) => myRedis.get(key),
    set: async (key, val) => myRedis.set(key, val, 'EX', 3600)
  }
});
```

## API Documentation

### Movies
- `sdk.movies.search(query, page, language)`
- `sdk.movies.getDetails(id, language)`
- `sdk.movies.getPopular(page, language)`
- `sdk.movies.getTrending(timeWindow, page, language)`
- `sdk.movies.getUpcoming(page, language)`
- `sdk.movies.getTopRated(page, language)`
- `sdk.movies.getGenres(language)`
- `sdk.movies.discover(params)`
- `sdk.movies.getWatchProviders(id, language)`
- `sdk.movies.getSimilar(id, page, language)`

### TV Shows
- `sdk.tv.search(query, page, language)`
- `sdk.tv.getDetails(id, language)`
- `sdk.tv.getPopular(page, language)`
- `sdk.tv.getTopRated(page, language)`
- `sdk.tv.getTrending(timeWindow, page, language)`
- `sdk.tv.getSeason(id, seasonNum, language)`
- `sdk.tv.getEpisode(id, seasonNum, epNum, language)`

### Configuration & Utilities
- `sdk.images.getUrl(path, size)`: Generate full image URLs.
- `sdk.find.byId(id, source, language)`: Find by IMDb/External ID.
- `sdk.configuration.getAPIConfig()`: Get base URLs for images.
- `sdk.trending.getAll(timeWindow, page)`: Get combined trending list.

## License

MIT
npm package: @ramlan442/openai
Description: openai api, chatgpt api
Author: ramlan442
Latest version: 1.0.0-preview6

# OPENAI API NODEJS

library to use api from openai in nodejs

## Installation

```bash

  npm i github:ramlan442/openai # latest from github

  # or

  npm i @ramlan442/openai # via npm
```

## Usage/Examples

for a complete example can check in test/example.ts

```typescript
import OpenAi from "@ramlan442/openai";

(async () => {
  const openai = new OpenAi({ key: process.env.OPENAI_KEY });

  // new chat
  const chat = await openai.chatCompletions("halo");
  console.log(chat);
  // end

  // continue conversation
  let chat = await openai.chatCompletions("my name is ramlan");
  console.log(chat.text);

  chat = await openai.chatCompletions("what is my name", {
    // without passing this will make new conversation
    parentMessageId: chat.id,
  });
  console.log(chat.text);
  // end

  // function call
  // load all func file, for template you can see in section func template
  // locate should in same folder
  const funcsDir = path.join(__dirname, "func");
  const funcs = fs.readdirSync(funcsDir);
  const tool_funcs: FunctionOpenAI[] = [];
  if (funcs.length > 0) {
    funcs.forEach((v) => {
      const funcFile = path.join(funcsDir, v);
      const { default: func } = require(funcFile);
      tool_funcs.push(func);
    });

  let chat = await openai.chatCompletions("nama aku adalah ramlan", {
    tools: tool_funcs,
  });
  console.log(chat.text);

  chat = await openai.chatCompletions("tanggal lahirku 04 april 2000", {
    tools: tool_funcs,
    // without passing this will make new conversation
    parentMessageId: chat.id,
  });
  console.log(chat.text);

  chat = await openai.chatCompletions(
    "siapa namaku dan kapan tanggal lahirku?",
    {
      tools: tool_funcs,
      // without passing this will make new conversation
      parentMessageId: chat.id,
    },
  );
  console.log(chat.text);
  //end


  // convert audio to text
  const transcribe = await openai.transcribe(
    // audio buffer
    fs.readFileSync(path.join(__dirname, "test.mp3")),
  );
  console.log(transcribe);
  //end
})();
```

## Function Template

for a complete example can check in test/func

```typescript
import type { FunctionOpenAI } from "@ramlan442/openai/types";

// this main function
export const getUserBirth = ({ day }: any) => `tanggal ${day}`;

// this for information function
export default {
  function: {
    name: "getUserBirth",
    description: "get user birth",
    parameters: {
      type: "object",
      properties: {
        day: { type: "string", description: "day of birth user" },
      },
      required: ["day"],
    },
    path: __filename,
  },
  type: "function",
} as FunctionOpenAI;
```

## TODO

- [ ] Chat Completions
  - [x] Stream
  - [x] Function Call
  - [ ] Vision
  - [ ] Split Text on Stream
  - [ ] Support Custom Domain, Body, etc..
  - [ ] Previous Chat (continue conversation)
- [x] Transcribe (convert audio to text)
- [ ] text to speech

## Credits

- inspiration from [chatgpt-api](https://github.com/transitive-bullshit/chatgpt-api)
npm package: @ramlmn/hh2
Description: A zero-dependency wrapper to create various instances of node http interfaces
Author: @r0mflip
Latest version: 0.2.3
Deprecated: You [most] probably don't need this package

# hh2

A zero-dependency wrapper to create various instances of node http interfaces.

## Usage

``` js
const options = {
  h2: Boolean
  secure: Boolean,
  ..., // other options for the server
};

const server = hh2(app, options);
```

The `app` is a `requestListener` for
[node http request](https://nodejs.org/api/http.html#http_event_request).

The `h2` options is used to create `http2` server and the secure option is to
create a `secureServer` variant of `http` or `http2`. By default a `http` server
is created.

Simply put, `hh2` creates the appropriate server and returns an instance of
[net.Server](https://nodejs.org/api/net.html#net_class_net_server).

### https server
``` js
const express = require('express');
const hh2 = require('@ramlmn/hh2');
const app = express();

const server = hh2(app, {
  secure: true,           // <- explicit https

  // certs as options
  key: fs.readFileSync('server-key.pem'),
  cert: fs.readFileSync('server-cert.pem'),
});

server.listen( _ => {
  console.log('> Server started');
});
```

### http2 server
``` js
const express = require('express');
const hh2 = require('@ramlmn/hh2');
const app = express();

const server = hh2(app, {
  h2: true                // <- explicit http2
  secure: true,

  // http2 in SSL
  key: fs.readFileSync('server-key.pem'),
  cert: fs.readFileSync('server-cert.pem'),
});

server.listen(_ => {
  console.log('> Server started');
});
```

## License
[MIT](LICENSE)
npm package: @ramlmn/serv
Description: Static file server with https and http2
Author: @r0mflip
Latest version: 0.8.0

[![npm-badge](https://img.shields.io/npm/v/@ramlmn/serv.svg?&style=flat-square)](https://www.npmjs.com/package/@ramlmn/serv)
[![travis-badge](https://img.shields.io/travis/ramlmn/serv/master.svg?label=Travis&style=flat-square)](https://travis-ci.org/ramlmn/serv)
[![appveyor-badge](https://img.shields.io/appveyor/ci/r0mflip/serv.svg?label=AppVeyor&style=flat-square)](https://ci.appveyor.com/project/r0mflip/serv)

# serv

Static file server with https, http2 (recommened only for development)

![terminal.png](snap/terminal.png)

## Installation

``` bash
$ npm install --global @ramlmn/serv
```


## Usage

```
  serv - Static file server with https and http2

  Usage
    Serve current directory

      $ serv

    Listen on port 8080 with compression

      $ serv --port 8080 --compress -d ./site/

    Listen over https with directory listing (uses self-signed certificates)

      $ serv --self-signed --listing

    Use specific SSL certificate and private key

      $ serv --ssl-cert ./cred.cert --ssl-key ./cred.key

  Options
    -h, --help             Shows this help text
    -p, --port             Port to listen on (default $PORT or 5000)
    -d, --dir              Path to directory
    -l, --listing          Enable directory listing
    -c, --compress         Enables compression (gzip)
    -s, --ssl              Use self-signed certificates (enables TLS/SSL)
    --ssl-cert             Path to SSL certificate file (enables TLS/SSL)
    --ssl-key              Path to SSL private key file (enables TLS/SSL)
    --http2                Use http2 (enables TLS/SSL)
```

**Note:** Currently no browser supports http2 without TLS, `--http2` currently is
worthy only when TLS/SSL is enabled
[(ref)](https://nodejs.org/api/http2.html#http2_server_side_example)


## License

[MIT](LICENSE)
npm package: @ramlmn/taggart
Description: An ETag header middleware for express like apps
Author: @mram
Latest version: 0.1.0
Deprecated: This package doesn't work as intended

# taggart

An ETag header middleware for express like apps. It is a zero dependency
middleware which generates `ETags` accurately.

## Installation

``` bash
$ npm install --save @ramlmn/taggart
```

## Usage

``` js
const express = require('express');
const taggart = require('@ramlmn/taggart');

const app = express();

app.use(taggart);

app.use(...);
...
```

# Working

`taggart` simply overrides the `write`, `end` and `send` methods of the `res`
(`ServerResponse` object) and tries to gather around the response content
being sent to the client, at the end, `taggart` adds the `ETag` header to the
response if it is't buffered or tansfered in chunks.

## License
[MIT](LICENSE)
npm package: @ramlmn/view
Description: Handle global events in views with ease
Author: Laxman Damera
Latest version: 1.0.0
Deprecated: This package is no longer maintained, do not use it.

# View
> Handle global events in views with ease

If there are multiple views in your applicaiton handling global events then triggering these events only for the active views is hard, or it _is_ as simple as this library.

## Insallation
``` sh
npm i --save @ramlmn/view
```

## Usage
In your `component.js` file

``` js
// CJS style
const {viewIn, viewOut, shouldHandle} = require('@ramlmn/view');

// ESM style
import {viewIn, viewOut, shouldHandle} from '@ramlmn/view';

// actual component code
class Modal extends HTMLElement {
   connectedCallback() {
     // a global event listener
     document.addEventListner('keydown', event => {
       if (shouldHandle(this.viewId)) {
         // do something
       }
     });
   }

   show() {
     // guard for repeated `viewIn()` calls
     this.viewId = viewIn();
   }

   hide() {
     viewOut(this.viewId);
   }
 }
```

## License
[MIT](license)