open-index/open-npm huggingface dataset:
npm package: @mrii/mock
Description: A simple package to mock data when the backend is busy.
Author: Abd Ul-Hameed Maree
Latest version: 0.0.6

# @scandinavia/mock

A simple package to mock data where is your backend is busy.

## Usage

```ts
import * as mock from '@scandinavia/mock';

// first name.
const randomMaleFirstName = mock.firstname('male');
const randomFemaleFirstName = mock.firstname('female');
const randomFirstName = mock.firstname();

// last name.
const randomLastName = mock.lastname();

// full name
const randomMaleFullName = mock.fullname('male');
const randomFullName = mock.fullname();

// username
const randomUsername = mock.username();

// word
const randomWord = mock.word();

// lorem/text
const randomTextWith100Words = mock.lorem(100);

// phone
const randomPhone = mock.phone();
const random12CharPhone = mock.phone(12);

// date
const rancomDateInTheFuture = mock.date(new Date(), new Date('2200'));
const rancomDateInThePast = mock.date();

// image
const randomSquareImageUrl = mock.image(200, 200);
const randomImageUrl = mock.date();

// avatar
const randomSmallAvatarUrl = mock.avatar(50);
const randomAvatarUrl = mock.date();

// number
const randomNumber = mock.number();
const randomFloatNumber = mock.number(true);
const randomNumberFrom10To100 = mock.number(10, 100);

// unique
const randomID = mock.unique();
const random4CharID = mock.unique(4);

// pick
const randomItem = mock.pick('item 1', 'item 2', 'item 3');
const randomValue = mock.pick(1, 2, 3);

// array
const randomArrayOfFullNamesLength20 = mock.array(() => mock.fullname(), 20);
```

this is the basic usage, let's see the real life application.

```ts
// in your model definition.
export type Product = {
  id: string;
  title: string;
  description: string;
  distributer: string;
  images: string[];
  price: number;
  category: 'tablet' | 'laptop' | 'mobile';
  discount: number;
  createdAt: Date;
};

export const mockProduct = (): Product => ({
  id: mock.unique(),
  title: mock.lorem(3),
  description: mock.lorem(20),
  distributer: mock.fullname(),
  images: mock.array(() => mock.image(200, 300), mock.number(1, 3)),
  price: mock.number(500, 4000),
  category: mock.pick('tablet', 'laptop', 'mobile'),
  discount: mock.number(0, 10),
  createdAt: mock.date(),
});

// in your products page.
const products = mock.array(mockProduct, mock.number(10, 30));

// in single product page.
const product = mockProduct();
```
npm package: @mrii/react-mousetrap-hook
Description: A simple wrapper on top of mousetrap to work with react
Author: Abd Ul-Hameed Maree
Latest version: 1.0.1
Deprecated: use 'react-mousetrap-hook' instead

# @mrii/react-mousetrap-hook

A simple wrapper on top of mousetrap to work with react.

## Installation

```bash
# yarn
yarn add @mrii/react-mousetrap-hook mousetrap

# npm
npm i @mrii/react-mousetrap-hook mousetrap
```

## Usage

bind events for specific components

```tsx
import type React from 'react';
import { useCallback } from 'react';
import { useMousetrap } from '@mrii/react-mousetrap-hook';

export const Component: React.FC = () => {
  // returns proxyRef from `@mrii/react-proxy-ref`
  const proxyRef = useMousetrap(
    ['enter', 'shift+enter'],
    useCallback(() => {
      // submit
    })
  );

  return (
    <>
      {/* the names doesn't matter, we are looping over them */}
      <input ref={proxyRef.email} name='email' />
      <input ref={proxyRef.password} name='password' />
    </>
  );
};
```

bind events to the document

```tsx
import type React from 'react';
import { useCallback } from 'react';
import { useMousetrap } from '@mrii/react-mousetrap-hook';

export const Component: React.FC = () => {
  // returns proxyRef from `@mrii/react-proxy-ref`
  useMousetrap(
    'ctrl+k',
    useCallback(() => {
      // open search
    }, []),
    'keyup'
  );

  //...
};
```

## Notes

- it's important to use `useCallback` when passing the callback to the hook, so you will save a lot of performance.
- there is no need to memoize the keys, because we are shallow comparing the changes.
npm package: @mrii/react-proxy-ref
Description: A simple package to create one ref for multiple elements.
Author: Abd Ul-Hameed Maree
Latest version: 1.0.4
Deprecated: use 'react-proxy-ref' instead

# @mrii/react-proxy-ref

A simple package to create one ref for multiple elements.

if you have a case where you need to create a large/dynamic number of refs, this package is the best fit for it.

it'll exports a hook that will create a proxy object, so you can assign multiple refs to it.

## Installation

```bash
# yarn
yarn add @mrii/react-proxy-ref

# npm
npm i @mrii/react-proxy-ref
```

## Usage

```tsx
import type React from 'react';
import { useProxyRef } from '@mrii/react-proxy-ref';

export const Component: React.FC = () => {
  const proxyRef = useProxyRef<HTMLInputElement | null>(
    null /* defaultValue, optional, default to `null` */
  );

  const way1 = () => {
    // use the refs if you know the names
    proxyRef.email.current?.value;
    proxyRef.password.current?.value;
  };

  const way2 = () => {
    // get all the refs if it's dynamic
    const refs = Object.values(proxyRef);

    refs.forEach(ref => {
      ref.current?.value;
    });
  };

  return (
    <>
      <input ref={proxyRef.email} name='email' />
      <input ref={proxyRef.password} name='password' />
    </>
  );
};
```

## How it works

it will create a proxy that will return `{ current: defaultValue }` when you'll try to access a key from it, and it will store it in the proxy, so you can access the value later
npm package: @mrii/react-table-builder
Description: library to easily build tables using MUI grid
Author: Abd UlHameed Maree
Latest version: 0.0.5

# @mrii/react-table-builder

library to easily build tables using MUI grid.

## Install

```sh
yarn add @mrii/react-table-builder

# or using npm

npm i @mrii/react-table-builder
```
npm package: @mrijke/eslint-config
Description: A mildly strict ESLint flat config for TypeScript + React projects, using `typescript-eslint`'s recommended type-checked rules.
Latest version: 2.1.0

# ESLint Config

A mildly strict ESLint flat config for TypeScript + React projects, using `typescript-eslint`'s recommended type-checked rules.

## How to use

Create an `eslint.config.js` (or `eslint.config.mjs`) in your project root:

```js
import config from "@mrijke/eslint-config";

export default [...config];
```

Or with CommonJS (`eslint.config.cjs`):

```js
const config = require("@mrijke/eslint-config");

module.exports = [...config];
```

For those who like ESLint a lot (and a bit of pain), use `@mrijke/eslint-config/strict` instead:

```js
import strictConfig from "@mrijke/eslint-config/strict";

export default [...strictConfig];
```

In case you want to gradually incorporate this ruleset in an existing project, use the `@mrijke/eslint-config/ci` configuration instead. This configuration uses [eslint-plugin-diff](https://github.com/paleite/eslint-plugin-diff) to only check for linting errors in files touched in a PR.

```js
import ciConfig from "@mrijke/eslint-config/ci";

export default [...ciConfig];
```

## Peer dependencies

Your project must have `typescript` installed (>= 4.8.4).

## Import rules

This config uses `eslint-plugin-import-x` instead of `eslint-plugin-import`. If you have custom import rule overrides, use the `import-x/` prefix:

```js
export default [
  ...config,
  {
    rules: {
      "import-x/no-default-export": "off", // override example
    },
  },
];
```
npm package: @mrijke/webcola
Description: WebCola
Author: Maarten Rijke
Latest version: 3.5.0

WebCola [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
=======

JavaScript constraint based layout for high-quality graph visualization and exploration 
using D3.js and other web-based graphics libraries.

<p align="center">
  <a href="http://marvl.infotech.monash.edu/webcola/examples/smallworldwithgroups.html">
    <img width="400" alt="Graph with simple groups" src="WebCola/examples/smallworldwithgroups.png" />
  </a>
  <a href="http://marvl.infotech.monash.edu/webcola/examples/alignment.html">
    <img width="400" alt="Graph with alignment constraints" src="WebCola/examples/alignment.png" />
  </a>
</p>

[Homepage with code and more examples](http://marvl.infotech.monash.edu/webcola)

Note: While D3 adaptor supports both D3 v3 and D3 v4, WebCoLa's interface is styled like D3 v3. Follow the setup in our homepage for more details.

Installation
------------

#### Browser:

    <!-- Minified version -->
    <script src="http://marvl.infotech.monash.edu/webcola/cola.min.js"></script>
    <!-- Full version -->
    <script src="http://marvl.infotech.monash.edu/webcola/cola.js"></script>

These files can also be accessed from [GitHub](WebCola/cola.js) ([minified](WebCola/cola.min.js)).

#### Npm:
	
	npm install webcola --save

You can also install it through npm by first adding it to `package.json`:

    "dependencies": {
      "webcola": "latest"
    }
Then by running `npm install`.

#### Bower:

	bower install webcola --save

If you use TypeScript, you can get complete TypeScript definitions by installing [tsd 0.6](https://github.com/DefinitelyTyped/tsd) and running `tsd link`.

Building
--------

*Linux/Mac/Windows Command Line:*

 - install [node.js](http://nodejs.org)
 - install grunt from the command line using npm (comes with node.js):

        npm install -g grunt-cli

 - from the WebCola directory:

        npm install

 - build, minify and test:

        grunt

This creates the `cola.js` and `cola.min.js` files in the `WebCola` directory, generates `index.js` for npm, and runs tests.

*Visual Studio:*

 - get the [typescript plugin](http://www.typescriptlang.org/#Download)
 - open webcola.sln

Running
-------

*Linux/Mac/Windows Command Line:*

Install the Node.js http-server module:

    npm install -g http-server

After installing http-server, we can serve out the example content in the WebCola directory.

    http-server WebCola

The default configuration of http-server will serve the exampes on [http://localhost:8080](http://localhost:8080).
npm package: @mrijoo/terminal
Description: Terminal Styling
Author: mrijoo
Latest version: 1.0.1

# Text2image

## Instalation :
```
npm i @mrijoo/terminal
```

## Usage:
```js
const terminal = require('@mrijoo/terminal')
```

## Example
```js
const { color, select, spinner } = require('@mrijoo/terminal')

// Color
console.log(color('Hello World', { color: 'red' }))

// Color with options
const options = {
    color: 'red',
    bgColor: 'blue'
}

console.log(color('Hello World', options))

// All Options
const options = {
    bold: true,
    dim: true,
    italic: true,
    underline: true,
    inverse: true,
    strikethrough: true,
    color: 'red',
    bgColor: 'blue',
    hex: '#FF0000',
    bgHex: '#0000FF',
    hsl: [0, 100, 50],
    bgHsl: [240, 100, 50],
    rgb: [255, 0, 0],
    bgRgb: [0, 0, 255],
    ansi: 31,
    bgAnsi: 44,
    random: true,
    bgRandom: true
}

// Select
select({
    message: 'Select a color',
    choices: [
        'red',
        'green',
        'blue'
    ]
}).then((choice) => {
    console.log(`You selected ${color(choice, { color: choice })}`);
});

// Spinner with custom frames
spinner.start({
    frames: ['-', '+', '-'],
    message: "Loading...",
    interval: 100,
    period: 3000
}).then(() => {
    console.log("Done!");
});

// Spinner with period
spinner.start({
    frames: "dots",
    message: "Loading...",
    interval: 100,
    period: 3000
}).then(() => {
    console.log("Done!");
});

// Spinner with stop function
spinner.start({
    frames: "dots",
    message: "Loading...",
    interval: 100
})

setTimeout(() => {
    spinner.stop()
}, 3000)

```
npm package: @mrijoo/text2image
Description: Create images from text
Author: izo
Latest version: 1.0.0

# Text2image

## Instalation :
```
npm i @mrijoo/text2image
```

## Usage:
```js
const text2image = require('@mrijoo/text2image')
```

## Example
```js
const fs = require("fs")
const text2image = require('@mrijoo/text2image');

text2image.convert('Hello, World!', "ObelixProBIt-cyr", { family: 'pg' }, { x: 70, y: 50, width: 400,  height: 400 }, {}).then(base64 => {
    fs.writeFile("out.png", base64.replace(/^data:image\/png;base64,/, ""), 'base64', function() {});
})

```
npm package: @mrimmortal09/react-native-fedimint-client
Description: fedimint uniffi bindings for react native
Author: MrImmortal09
Latest version: 0.1.5

# @mrimmortal09/react-native-fedimint-client

A React Native client library for Fedimint, featuring Rust bindings generated via UniFFI. This package is pre-configured with necessary patches and binary optimizations for smooth usage.

## 📦 Installation

```bash
yarn add @mrimmortal09/react-native-fedimint-client
```

## Usage

### 📱 Compatibility & Requirements

*   **Android**:
    *   `arm64-v8a`: Supported (Modern Devices)
    *   `x86_64`: Supported (Emulators)
    *   `armeabi-v7a`: Not supported.
*   **iOS**:
    *   `arm64`: **Supported (Physical Devices)**.
    *   `x86_64`: **Supported (Simulator)**. 
    *   **Note for M1/M2 Users**: To run on Simulator, you must run it in **Rosetta** mode (which uses `x86_64`), as native `arm64` simulator support is currently blocked by upstream dependencies.
*   **Expo**: Requires **Development Build** (prebuild). This is a native module.

### 1. Initialize the Client

You must verify that the database path exists and is writable before initializing the client.

```typescript
import { setup, sendRpc } from '@mrimmortal09/react-native-fedimint-client';

// Option 1: React Native CLI (using react-native-fs)
import RNFS from 'react-native-fs';

const initFedimintCLI = async () => {

    const dbPath = `${RNFS.DocumentDirectoryPath}/fedimint_db`;
    
    console.log("Using DB Path:", dbPath);
    setup(dbPath);
};

// Option 2: Expo (using expo-file-system)
import { Paths } from 'expo-file-system';

const initFedimintExpo = async () => {
  try {

    const dbUriPath = Paths.document.uri; // e.g. file:///data/...
    
    // Strip the file:// scheme to get the plain filesystem path
    const dbPath = dbUriPath.replace(/^file:\/\//, '');

    console.log("Using DB Path:", dbPath);
    setup(dbPath);
    console.log("Setup called successfully with path: " + dbPath);

  } catch (e: any) {
    console.error("Setup failed:", e);
  }
};
```

### 2. Send RPC Commands

Once initialized, you can send JSON RPC commands to the underlying Fedimint client.

```typescript
const getInfo = async () => {
  try {
    const response = await sendRpc(JSON.stringify({ "request_id": "1", "method": "has_mnemonic_set" }));
    console.log('Fedimint Info:', response);
  } catch (error) {
    console.error('RPC Error:', error);
  }
};
```

## License

MIT
npm package: @mrinjamul/hubot-calc
Description: A hubot script to calculate simple maths
Author: Injamul Mohammad Mollah
Latest version: 1.0.0

# hubot-calc

A hubot script to do simple maths

See [`src/calc.coffee`](src/calc.coffee) for full documentation.

## Installation

In hubot project repo, run:

`npm install @mrinjamul/hubot-calc --save`

Then add **hubot-calc** to your `external-scripts.json`:

```json
["hubot-calc"]
```

## Sample Interaction

```
hubot calculate me - hubot calculate maths
```
npm package: @mrinjamul/hubot-uuid
Description: A hubot script to generate uuid
Author: Injamul Mohammad Mollah
Latest version: 1.0.1

# hubot-uuid

A hubot script to generate uuid

See [`src/uuid.js`](src/uuid.js) for full documentation.

## Installation

In hubot project repo, run:

`npm install hubot-uuid --save`

Then add **hubot-uuid** to your `external-scripts.json`:

```json
["hubot-uuid"]
```

## Sample Interaction

```
hubot uuid me - generate uuid for you
```