open-index/open-npm huggingface dataset:
npm package: @sharadbrat/randomizer
Description: Library with helper methods to work with weighted random.
Author: sharadbrat
Latest version: 0.0.2

# @sharadbrat/randomizer

Tiny library that provides simple API for weighted random. It works like that:

![Illustration of the workflow](illustration.png "Illustration")

## Start

Install dependency:

`npm install @sharadbrat/randomizer`

Import in project:

```javascript
import Randomizer from '@sharadbrat/randomizer';
```

Use:

```javascript
const r = new Randomizer([
  [1, 'A'],
  [1, 'B'],
  [1, 'C'],
]);

r.choose(); // will be 'A', 'B', or 'C' with equal probability
```

## Examples

Weights define the probability, according to this formula: `{weight} / {sum_of_weights}`

```javascript
const r = new Randomizer([
  [1, 'A'],
  [3, 'B'],
]);

r.choose(); // will be 'A' with 0.25 probability or 'B' with 0.75 probability
```

## Testing

`npm run test`

Runs tests with mocha.

## Authors

[sharadbrat](https://github.com/sharadbrat)


## License

MIT
npm package: @sharadbrat/variator
Description: Library that provides convenient API for easy AB-testing
Author: sharadbrat
Latest version: 0.0.1

# @sharadbrat/variator

Tiny javascript library that provides simple API for AB and variation testing.

## Start

Install dependency:

`npm install @sharadbrat/variator`

Import in project:

```javascript
import Variator from '@sharadbrat/variator';
```

Use:

```javascript
const v = new Variator();

v.set({
  featureA: true,
  featureB: false,
});

v.runTest('featureA', () => {
  // do ab testing
});

v.runTest('featureB', () => {
  // don't do ab testing
})
```

## Examples

Set function merges provided objects:

```javascript
const v = new Variator();

v.set({
  featureA: true,
  featureB: true,
});

v.set({
  featureB: false, // { featureA: true, featureB: false }
});
```

Clean inner state:

```javascript
const v = new Variator();

v.set({
  featureA: true,
});

v.clear(); // sets to empty object
```

Weighted variations for certain features:

```javascript
const v = new Variator();

v.set({
  featureC: true,
});

v.runWeightedTest('featureC', [[1, 'A'], [1, 'B']], (variationName) => {
  // do ab testing with randomly chosen variation
  // variationName is either 'A' or 'B'
});
```

## Testing

`npm run test`

Runs tests with mocha.

## Authors

[sharadbrat](https://github.com/sharadbrat)

## License

MIT
npm package: @sharagulov/create-react-monorepo
Description: Reactor-CLI to easify frontend developing
Latest version: 1.0.7

# ⚪ create-react-monorepo

![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/sharagulov/create-react-monorepo/npm-publish.yml?style=for-the-badge)
![npm](https://img.shields.io/npm/v/@sharagulov/create-react-monorepo?color=blue&style=for-the-badge)
![GitHub License](https://img.shields.io/github/license/sharagulov/create-react-monorepo?style=for-the-badge)

A professional **React + Express monorepo generator** for frontend-developers that helps to start projects in seconds.  
Perfect for users who need **a fast, structured, and scalable** setup.


## 🚀 Features

✅ **Automatic project structure**: `client/` for React, `server/` for Node.js  
✅ **Supports PostgreSQL** (optional)  
✅ **Uses EJS templates** for dynamic configurations  
✅ **Customizable ports and database settings**  
✅ **Zero manual setup** – just run a single command!  


## 📦 Installation

You can install it globally:

```sh
npm install -g @sharagulov/create-react-monorepo
```

Or use it instantly with `npx`:

```sh
npx @sharagulov/create-react-monorepo my-project
```
 
## 🛠️ Usage

Once installed, CRM generates a new monorepo.

The script will ask for:
- Whether to include a **PostgreSQL backend**
- Database **username, password, port**
- Proxy and PostgreSQL **ports**
- Automatically scaffolds a **monorepo structure**.


## 📂 Project Structure

```bash
my-project
├── client/      # React frontend
│   ├── src/
│   ├── public/
│   ├── package.json
│   └── craco.config.js
├── server/      # Express backend (optional)
│   ├── controllers/
│   ├── routes/
│   ├── prisma/
│   ├── package.json
│   ├── .env     # Auto-generated from user input
│   └── server.js
└── README.md
```


## 🔧 Commands

Inside your project, run:

```sh
cd my-project/client && npm install
cd ../server && npm install  # Only if backend is enabled
```

To start the frontend:

```sh
cd client
npm start
```

To start the backend:

```sh
cd server
npm run dev
```

## 📜 Environment Variables (`.env`)

If you enabled the backend, a `.env` file will be generated:

```env
DATABASE_URL=postgresql://USERNAME:PASSWORD@localhost:PORT/NAME
SERVER_PORT=3001
```

You can manually edit these values later.


## 📄 License

This project is licensed under the **MIT License** – you're free to use, modify, and distribute it.


## 📞 Contact

**Author:** Pavel Sharagulov  
📧 Email: [pavel.sharagulov@yandex.ru](mailto:pavel.sharagulov@yandex.ru)  
🔗 GitHub: [sharagulov](https://github.com/sharagulov)  
📦 npm: [@sharagulov](https://www.npmjs.com/~sharagulov)

---

> **Made with ❤️**
npm package: @sharagulov/reui
Description: ![npm](https://img.shields.io/npm/v/@sharagulov/reui?color=blue&style=for-the-badge) ![GitHub Actions](https://img.shields.io/github/actions/workflow/status/sharagulov/reui/npm-publish.yml?style=for-the-badge) ![GitHub License](https://img.shields.io/gith
Latest version: 1.0.13

# REUI – Minimalist React UI Components CLI

![npm](https://img.shields.io/npm/v/@sharagulov/reui?color=blue&style=for-the-badge)
![GitHub Actions](https://img.shields.io/github/actions/workflow/status/sharagulov/reui/npm-publish.yml?style=for-the-badge)
![GitHub License](https://img.shields.io/github/license/sharagulov/reui?style=for-the-badge)

**REUI** is a simple, professional CLI tool designed to instantly integrate minimalistic and visually appealing React UI components into your existing React project. Inspired by Apple's minimalistic design philosophy.



## 🚀 Quickstart

Add UI components directly to your React project with a single command:

```bash
npx @sharagulov/reui
```


## 📂 Component structure example

```bash
your-project
└── src/
    └── components/
        └── Button/
            ├── Button.jsx
            └── Button.scss
```


## 📦 Available Components

| Component    | Status |
| -------- | ------- |
| Button  | ✅ Available |
| Curtain | ✅ Available |
| Popup | ✅ Available |


## 📄 License

This project is licensed under the **MIT License** – you're free to use, modify, and distribute it.


## 📞 Contact

**Author:** Pavel Sharagulov  
📧 Email: [pavel.sharagulov@yandex.ru](mailto:pavel.sharagulov@yandex.ru)  
🔗 GitHub: [sharagulov](https://github.com/sharagulov)  
📦 npm: [@sharagulov](https://www.npmjs.com/~sharagulov)

---

> **Made with ❤️**
npm package: @sharbaknra/hadith-cli
Description: CLI tool for Islamic hadith entries with daily reminders and context-based recommendations
Latest version: 0.1.0

# hadith-cli

Command-line tool that shows a hadith in your terminal and supports local hadith cache sync.

## Requirements

- Node.js `>=18`
- npm

## Installation

```bash
# one-off run
npx hadith-cli startup

# global install
npm install -g hadith-cli
```

Installed binaries:
- `hadith-cli`
- `hadith`

## Usage

```bash
# default command (same as "daily")
hadith-cli

# show today's entry
hadith-cli daily

# random entry
hadith-cli random

# search text
hadith-cli search "patience"

# list categories
hadith-cli category --list

# show entries for a category
hadith-cli category --category daily

# show specific entry by id
hadith-cli show morning-1

# favorites
hadith-cli favorites --add morning-1
hadith-cli favorites --list
hadith-cli favorites --remove morning-1

# show startup hadith now
hadith-cli startup

# scrape full english hadith cache
hadith-cli scrape-hadith
```

Most content commands support:
- `-j, --json` for JSON output
- `-p, --plain` for compact output

## Auto-show Hadith On Terminal Open

The npm package does not edit your shell profile automatically.
Configure it once in your shell startup file.

### Bash (Linux/macOS)

Add to `~/.bashrc`:

```bash
hadith-cli startup 2>/dev/null || true
```

Reload:

```bash
source ~/.bashrc
```

### Zsh (Linux/macOS)

Add to `~/.zshrc`:

```bash
hadith-cli startup 2>/dev/null || true
```

Reload:

```bash
source ~/.zshrc
```

### PowerShell (Windows)

Open profile:

```powershell
notepad $PROFILE
```

Add:

```powershell
hadith-cli startup 2>$null
```

Restart PowerShell.

## Cache and Config

- `startup` reads from local hadith cache.
- If cache is missing/stale, it tries to sync from remote source.
- If sync fails (offline/network issue), it falls back to seed hadiths.

Environment variable:
- `HADITH_CLI_CONFIG_DIR` - custom directory for config and hadith cache.

## Development

```bash
npm install
npm run lint
npm run typecheck
npm test
npm run build
npm run check
```

## Publishing

```bash
npm login
npm publish
```

`prepublishOnly` runs `npm run check`, so publish fails if quality checks fail.

## License

MIT