open-index/open-npm huggingface dataset:
npm package: @mock/fs
Description: Mock FS in-memory
Latest version: 0.2.0

# @mock/fs ![npm](https://flat.badgen.net/npm/v/@mock/fs)

Mock FS in-memory using [memfs](https://github.com/streamich/memfs).

## Install

```sh
$ yarn add --dev @mock/fs
```

## Usage

```ts
const mockFs: (file: string) => () => void
```

```ts
// get-data.js
import { promises } from 'fs'

export const getData = (): Promise<string> => promises.readFile('./data.txt', 'utf8')
```

```ts
import test from 'blue-tape'
import { mockFs } from '@mock/fs'

test('getData', async (t) => {
  const { fs, unmockFs } = mockFs('./get-data')

  fs.writeFileSync('./data.txt', 'fake data')

  const { getData } = await import('./get-data')
  const data = await getData()

  t.equal(
    data,
    'fake data',
    'should get data'
  )

  unmockFs()
})
```
npm package: @mock/global
Description: Mock global scope and `global` object
Latest version: 0.2.0

# @mock/global ![npm](https://flat.badgen.net/npm/v/@mock/global)

Mock global scope and `global` object.

## Install

```sh
$ yarn add --dev @mock/global
```

## Usage

```ts
type TMocks = {
    [key: string]: any
}

const mockGlobal: (file: string, mocks: TMocks) => () => void
```

```ts
// wait-for-5-min.ts
export const waitFor5Min = (): Promise<void> => new Promise((resolve) => {
  setTimeout(resolve, 5 * 60 * 1000)
})
```

```ts
import test from 'blue-tape'
import { mockGlobal } from '@mock/global'

test('waitFor30Sec', (t) => {
  const unmockGlobal = mockGlobal('./wait-for-30-sec', {
    setTimeout: (callback: () => void, delay: number) => {
      t.equal(
        delay,
        5 * 60 * 1000,
        'should wait for 5 min'
      )

      callback()
    }
  })

  const { waitFor5Min } = await import('./wait-for-30-sec')

  await waitFor5Min()

  unmockGlobal()
})
```
npm package: @mock/request
Description: Mock HTTP(S) requests through redirecting to a temporary HTTP(S) server
Latest version: 0.2.1

# @mock/request ![npm](https://flat.badgen.net/npm/v/@mock/request)

Mock HTTP(S) requests through redirecting to a temporary HTTP(S) server allowing to handle a request in whatever way.

## Install

```sh
$ yarn add --dev @mock/request
```

## Usage

```ts
const mockRequest: (file: string, callback: http.RequestListener) => () => void
```

```ts
// fetch-data.js
import fetch from 'node-fetch'

export const fetchData = async (): Promise<{ [key: string]: any }> => {
  const response = await fetch('https://api.thecatapi.com/v1/breeds')
  const data = await response.json()

  return data
}
```

```ts
import test from 'blue-tape'
import { mockRequest } from '@mock/request'

test('fetchData', async (t) => {
  const unmockRequest = mockRequest('./fetch-data', (req, res) => {
    if (req.url === 'https://api.thecatapi.com/v1/breeds' && req.method === 'GET') {
      res.end(JSON.stringify({ fake: true }))
    } else {
      t.fail('should not get here')
    }
  })

  const { fetchData } = await import('./fetch-data')
  const data = await fetchData()

  t.deepEqual(
    data,
    { fake: true },
    'should fetch data'
  )

  unmockRequest()
})
```
npm package: @mock/require
Description: Mock require
Latest version: 0.2.2

# @mock/require ![npm](https://flat.badgen.net/npm/v/@mock/require)

Mock `require`, doesn't currently work with real `--experimental-modules` ESM.

## Install

```sh
$ yarn add --dev @mock/require
```

## Usage

```ts
type TMocks = {
  [key: string]: any
}

const mockRequire: (file: string, mocks: TMocks) => () => void
```

```ts
// text.ts
export default 'cpus'
```

```ts
// get-data.ts
import text from './text'
import { cpus } from 'os'

export const getData = () => `${cpus().length} ${text}`
```

```ts
import test from 'blue-tape'
import { mockRequire } from '@mock/import'

test('getData', async (t) => {
  const unmockRequire = mockRequire('./get-data', {
    './text': {
      default: 'cpus!!!'
    },
    os: {
      cpus: () => new Array(100)
    }
  })

  const { getData } = await import('./get-data')
  const data = await geteData()

  t.equal(
    data,
    '100 cpus!!!',
    'should get data'
  )

  unmockRequire()
})
```
npm package: @mockend/rand-port
Description: rand port
Latest version: 1.2.1

# Usage

Command line

```
rand-port [system|user|dynamic]
```

Module

```
const randPort = require("@mockend/rand-port");

randPort();
randPort("user");
```

__randPort(['system'|'user'|'dynamic'])__ (default: user)

# License

MIT
npm package: @mockherodev/mcp-server
Description: MCP server for MockHero — generate realistic test data from Claude Desktop, Cursor, and other AI agents
Author: MockHero
Latest version: 0.1.3

# @mockherodev/mcp-server

MCP server for [MockHero](https://mockhero.dev) — generate realistic test data from Claude Desktop, Cursor, Windsurf, and other AI agents.

## Setup

### Claude Desktop

Add to `~/.claude/claude_desktop_config.json`:

```json
{
  "mcpServers": {
    "mockhero": {
      "command": "npx",
      "args": ["@mockherodev/mcp-server"],
      "env": {
        "MOCKHERO_API_KEY": "mh_live_your_key_here"
      }
    }
  }
}
```

### Cursor

Add to `.cursor/mcp.json` in your project:

```json
{
  "mcpServers": {
    "mockhero": {
      "command": "npx",
      "args": ["@mockherodev/mcp-server"],
      "env": {
        "MOCKHERO_API_KEY": "mh_live_your_key_here"
      }
    }
  }
}
```

### Claude Code

```bash
claude mcp add mockhero -- env MOCKHERO_API_KEY=mh_live_xxx npx @mockherodev/mcp-server
```

## Tools

### generate_test_data

Generate realistic test data from a structured schema or plain English description.

```
"Generate 50 users with German names and 200 orders linked to them"
```

### detect_schema

Convert SQL CREATE TABLE statements or JSON samples into MockHero's schema format.

### list_field_types

List all 135+ supported field types with descriptions and parameters.

### list_templates

List pre-built schema templates (e-commerce, blog, SaaS, social network).

### generate_from_template

Generate data using a template — no schema definition needed.

```
Use the ecommerce template at 2x scale with German locale
```

## Get your API key

Sign up free at [mockhero.dev](https://mockhero.dev)
npm package: @mocking-bird/core
Description: > Do not install as a package, use `@mocking-bird/mongoose` or `@mocking-bird/graphql` directly!
Author: batrdn
Latest version: 1.2.1

# Core

> Do not install as a package, use `@mocking-bird/mongoose` or `@mocking-bird/graphql` directly!

The core module contains the abstract class definitions and overall the base functionalities used for fixture
generations. New packages may extend the core module to create their own fixture generation logic.

## Main Components

- `CoreFixture` - The abstract class that defines the main functionalities for fixture generation.
- `PathFinder` - The abstract class that defines the logic for resolving field paths.
- `CoreTypeMapper` - The abstract class that defines the logic for mapping types to fixture generation.
- `FakerApi` - A class that abstracts the logic generating fake data. It uses the `faker.js` library under the hood.
- `FakerFinder` - A class that resolves the `faker` method for a given field name using fuzzy search.
npm package: @mockingbot/react-document-events
Description: Declarative component for binding handlers to document and window - and cleaning them up.
Author: Samuel Reed
Latest version: 1.0.0-dev.1

# react-document-events

Declarative method for binding handlers to document and window - and cleaning them up.

### Usage

Given an imaginary component that listens to the 'esc' key, but only if its
parent tells it to:

```js
import React from 'react';
import DocumentEvents from 'react-document-events';

class SideEffectingComponent extends React.Component {

  onKeyUp = (e) => {
    if (e.keyCode === 27 /* esc */) this.toggleSomethingOnEsc(e);
  };

  render() {
    var target = process.browser ? document : null;
    return (
      <div>
        <div>Component Innards</div>
        <DocumentEvents enabled={this.props.listenToKeys} onKeyUp={this.onKeyUp} passive={false} capture={false} />
      </div>
    );
  }
}
```

#### Props

* **capture** (`boolean=false`): If true, will add listeners in the `capture` phase.
* **enabled** (`boolean=true`): If true, will attach handlers, if false, will remove them. Safe to add/remove at will.
* **passive** (`boolean=false`): If true, will add listeners with the
  [passive option](https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener#Improving_scrolling_performance_with_passive_listeners),
  if supported. A feature test is performed to ensure this does not accidentally set `useCapture`.
* **target** (`(HTMLElement | () => HTMLElement | () => void | void)=document`): The element to attach listeners to.
  May also be a function returning said element. If void, or returning void, this element will noop.
  * To be safe when server rendering, the default is `document`, but only if `process.browser` returns true.
* **on[eventName]** (`EventHandler`): Any valid [event handler name](https://facebook.github.io/react/docs/events.html).
  Note these events are attached directly, so you will receive browser events, not React's `SyntheticEvent`, although the semantics are mostly the same.
npm package: @mockingbot/react-native-advanced-webview
Description: A WebView component for react-native more advanced features
Latest version: 0.62.2

# react-native-advanced-webview

## Features
extended WebView with more advanced WebView features

* initialJavaScript
Same as `injectedJavaScript` prop but will execute the JavaScript code on page loading started instead of on page loading finished

* allowFileAccessFromFileURLs



## Install

```bash
npm i react-native-advanced-webview --save
react-native link react-native-advanced-webview
```
npm package: @mockingbot/react-native-gesture-handler
Description: Experimental implementation of a new declarative API for gesture handling in react-native
Author: Krzysztof Magiera
Latest version: 1.0.14

<p align="center">
  <img height="150" src="https://kmagiera.github.io/react-native-gesture-handler/img/ghlogo.svg" />
  <h1 align="center">React Native Gesture Handler</h1>
  <h3 align="center">Declarative API exposing platform native touch and gesture system to React Native.</h3>
</p>

React Native Gesture Handler provides native-driven gesture management APIs for building best possible touch-based experiences in React Native.

With this library gestures are no longer controlled by the JS responder system, but instead are recognized and tracked in the UI thread.
It makes touch interactions and gesture tracking not only smooth, but also dependable and deterministic.

## Installation

Check [getting started](https://kmagiera.github.io/react-native-gesture-handler/docs/getting-started.html) section of our docs for the detailed installation instructions.

## Documentation

Check out our dedicated documentation page for info about this library, API reference and more: [https://kmagiera.github.io/react-native-gesture-handler](https://kmagiera.github.io/react-native-gesture-handler)

## Examples

If you want to play with the API but don't feel like trying it on a real app, you can run the example project. Clone the repo, go to the `Example/` folder and run:
```bash
  yarn install
```

Then run `react-native run-android` or `react-native run-ios` (depending on which platform you want to run the example app on).

You will need to have an Android or iOS device or emulator connected as well as `react-native-cli` package installed globally.

## License

Gesture handler library is licensed under [The MIT License](LICENSE).

## Credits

This project is supported by amazing people from [Expo.io](https://expo.io) and [Software Mansion](https://swmansion.com)

[![expo](https://avatars2.githubusercontent.com/u/12504344?v=3&s=100 "Expo.io")](https://expo.io)
[![swm](https://avatars1.githubusercontent.com/u/6952717?v=3&s=100 "Software Mansion")](https://swmansion.com)
npm package: @mockingbot/reactxp-virtuallistview
Description: General-purpose virtualized list view built on the cross-platform ReactXP library
Author: ReactXP Team
Latest version: 2.0.0-rc.1

# ReactXP VirtualListView
VirtualListView is a flexible, generalized list view built on [ReactXP](https://microsoft.github.io/reactxp/).

[Detailed documentation](https://microsoft.github.io/reactxp/docs/extensions/virtuallistview.html) can be found on the ReactXP site.

### Prerequisites
* [ReactXP](https://microsoft.github.io/reactxp/)

## Contributing

This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments. 

You must sign a Contribution License Agreement (CLA) before your PR will be merged. This a one-time requirement for Microsoft projects in GitHub. You can read more about [Contribution License Agreements (CLA)](https://en.wikipedia.org/wiki/Contributor_License_Agreement) on Wikipedia. You can sign the Microsoft Contribution License Agreement by visiting https://cla.microsoft.com/. Use your GitHub account to login.

## License
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details