open-index/open-npm huggingface dataset:
npm package: @jiwang/reverse-sentence
Description: Reverses a sentence
Author: jiwang
Latest version: 0.1.0

# reverse-sentence

Reverses the words of a sentence.

## install

```sh
npm intall @jiwang/reverse-sentence
```

## API

```js
require("reverse-sentence") => Function
reverse(sentence) => String
```

## Example

```js
const reverseSentence = require("reverse-sentence");
const sentence = "Hello Jiwang";
const reversed = reverseSentence(sentence);

console.log(reversed); //Jiwang Hello
```

## License

MIT
npm package: @jiweiyuan/runbrowser-mcp
Description: MCP server for RunBrowser — control your running Chrome browser via Playwright
Latest version: 0.0.4

# @jiweiyuan/runbrowser-mcp

Standalone MCP (Model Context Protocol) server for [RunBrowser](https://github.com/runbrowser/runbrowser) — control your running Chrome browser via Playwright with your logins, extensions, and cookies already there.

## Setup

### Prerequisites

1. [**Install the RunBrowser Extension**](https://chromewebstore.google.com/detail/@jiweiyuan/runbrowser-mcp/jfeammnjpkecdekppnclgkkffahnhfhe) from Chrome Web Store
2. Click the extension icon on a tab → turns green when connected

### MCP Client Configuration

Add to your MCP client settings (e.g., Claude Desktop, Cursor, etc.):

```json
{
  "mcpServers": {
    "runbrowser": {
      "command": "npx",
      "args": ["-y", "@jiweiyuan/runbrowser-mcp@latest"]
    }
  }
}
```

## MCP Tools

The server exposes the following tools:

| Tool | Description |
|------|-------------|
| **`execute`** | Run Playwright code snippets with `{page, state, context}` in scope |
| **`reset`** | Recreate CDP connection and reset browser/page/context |
| **`snapshot`** | Take accessibility snapshot of the current page (fast, text-based) |
| **`screenshot`** | Take screenshot with Vimium-style accessibility labels overlaid |

## MCP Resources

| Resource | Description |
|----------|-------------|
| `debugger-api` | Debugger API documentation |
| `editor-api` | Live editor API documentation |
| `styles-api` | CSS styles inspection API documentation |

## Environment Variables

### `RUNBROWSER_AUTO_ENABLE`

Auto-create a tab when Playwright connects (no manual extension click needed).

```json
{
  "mcpServers": {
    "runbrowser": {
      "command": "npx",
      "args": ["-y", "@jiweiyuan/runbrowser-mcp@latest"],
      "env": {
        "RUNBROWSER_AUTO_ENABLE": "1"
      }
    }
  }
}
```

## Remote Agents (Devcontainers, VMs, SSH)

Run agents in isolated environments while controlling Chrome on your host.

**On host (where Chrome runs):**

```bash
npx -y @jiweiyuan/runbrowser serve --token <secret>
```

**In container/VM (where agent runs):**

```json
{
  "mcpServers": {
    "runbrowser": {
      "command": "npx",
      "args": ["-y", "@jiweiyuan/runbrowser-mcp@latest", "--host", "host.docker.internal", "--token", "<secret>"]
    }
  }
}
```

Or with environment variables:

```json
{
  "mcpServers": {
    "runbrowser": {
      "command": "npx",
      "args": ["-y", "@jiweiyuan/runbrowser-mcp@latest"],
      "env": {
        "RUNBROWSER_HOST": "host.docker.internal",
        "RUNBROWSER_TOKEN": "<secret>"
      }
    }
  }
}
```

Use `host.docker.internal` for devcontainers, or your host's IP for VMs/SSH.

## Programmatic Usage

```ts
import { startMcp } from '@jiweiyuan/runbrowser-mcp'

// Start MCP server (connects to stdio transport)
await startMcp()

// With remote relay server
await startMcp({
  host: 'host.docker.internal',
  token: 'your-secret-token',
})
```

## License

MIT
npm package: @jiwon.me/pubsub-ts
Description: publisher-subscriber pattern implementation on typescript
Author: Jiwon Park
Latest version: 0.1.0

# pubsub-ts

## Usage
```ts
import { PubSub } from "./pubsub";

interface TOPICS {
    'ADD': (a: number, b: number) => number;
    'GET_USER_ID': (userName: string) => string;
}

const pubsub = new PubSub<TOPICS>();

pubsub.sub('ADD', (a: number, b: number) => (a+b));
pubsub.sub('MINUS', )

```