open-index/open-npm huggingface dataset:
npm package: @rabarbra/ft_react
Description: Naive implementation of React-like library
Author: Polina Simonenko
Latest version: 1.0.6

# Naive React-like Library

This is a naive implementation of a React-like library designed to manage a virtual DOM, component lifecycle, and state management. 

## Features

- Virtual DOM
- Component-based Architecture
- State Management with `useState`
- Effect Hook with `useEffect`

## Installation

```bash
npm install @rabarbra/ft_react
```

## Usage

### Generate your app template

```bash
# Init a new project
./node_modules/@rabarbra/ft_react/scripts/init-project.js
# or 
npx init-project

# Start development server
npm start

# Create production build (it will create ./dist folder containing production build)
npm run build
```

### Basic Example

```jsx
import ftReact from '@rabarbra/ft_react';

function App() {
  const [count, setCount] = ftReact.useState(0);
  return (
    <div style={{ textAlign: 'center' }}>
      <h1>Hello, World!</h1>
      <p>Count: {count}</p>
      <button onClick={() => setCount(count + 1)}>Increment</button>
    </div>
  );
}

const container = document.getElementById('app');
ftReact.render(<App />, container);
```

## API

### `createElement`

Creates a virtual DOM element.

```jsx
const element = <div id="my-div">Hello, World!</div>;
```

### `render`

Renders a virtual DOM element to the actual DOM.

```jsx
const container = document.getElementById('app');
ftReact.render(element, container);
```

### `useState`

Manages state in a functional component.

```jsx
function Counter() {
  const [count, setCount] = ftReact.useState(0);
  return (
    <button onClick={() => setCount(count + 1)}>
      Count: {count}
    </button>
  );
}
```

### `useEffect`

Performs side effects in a functional component.

```jsx
function Timer() {
  const [time, setTime] = ftReact.useState(0);

  ftReact.useEffect(() => {
    const interval = setInterval(() => setTime(time + 1), 1000);
    return () => clearInterval(interval);
  }, [time]);

  return <div>Time: {time}</div>;
}
```

## License

This project is licensed under the MIT License.
npm package: @rabati/semaver
Description: semaver =======
Author: rabati.org
Latest version: 0.0.1

semaver
=======



[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)
[![Version](https://img.shields.io/npm/v/semaver.svg)](https://npmjs.org/package/semaver)
[![Downloads/week](https://img.shields.io/npm/dw/semaver.svg)](https://npmjs.org/package/semaver)
[![License](https://img.shields.io/npm/l/semaver.svg)](https://github.com/denizgursoy/semaver/blob/master/package.json)

<!-- toc -->
* [Usage](#usage)
* [Commands](#commands)
<!-- tocstop -->
# Usage
<!-- usage -->
```sh-session
$ npm install -g semaver
$ semaver COMMAND
running command...
$ semaver (-v|--version|version)
semaver/0.0.0 darwin-x64 node-v16.2.0
$ semaver --help [COMMAND]
USAGE
  $ semaver COMMAND
...
```
<!-- usagestop -->
# Commands
<!-- commands -->
* [`semaver create`](#semaver-create)
* [`semaver help [COMMAND]`](#semaver-help-command)
* [`semaver update`](#semaver-update)

## `semaver create`

Describe the command here

```
USAGE
  $ semaver create

OPTIONS
  -i, --initial=initial  initial version

DESCRIPTION
  ...
  Extra documentation goes here
```

_See code: [src/commands/create.js](https://github.com/denizgursoy/semaver/blob/v0.0.0/src/commands/create.js)_

## `semaver help [COMMAND]`

display help for semaver

```
USAGE
  $ semaver help [COMMAND]

ARGUMENTS
  COMMAND  command to show help for

OPTIONS
  --all  see all commands in CLI
```

_See code: [@oclif/plugin-help](https://github.com/oclif/plugin-help/blob/v3.2.3/src/commands/help.ts)_

## `semaver update`

Describe the command here

```
USAGE
  $ semaver update

OPTIONS
  -t, --tag    tag version in git
  -x, --major  increase major version
  -y, --minor  increase minor version
  -z, --patch  increase patch version

DESCRIPTION
  ...
  Extra documentation goes here
```

_See code: [src/commands/update.js](https://github.com/denizgursoy/semaver/blob/v0.0.0/src/commands/update.js)_
<!-- commandsstop -->
npm package: @rabbit-company/argon2id
Description: Argon2id hash function
Author: Rabbit Company
Latest version: 2.1.0

# Argon2id-WASM

Argon2id implementation in JavaScript (ES6, WASM, Rust).

## Usage

### 1. Download library
```bash
npm i --save @rabbit-company/argon2id
```

### 2. Import library
```js
import Argon2id from "@rabbit-company/argon2id";
```

### 3. Use library
```js
/*

  Parameters:
  1. Message (String)
  2. Salt (String) <>
  3. Parallelism Factor (Int) <4> (Min = 1)
  4. Memory Cost (Int) <16> (Min = 2)
  5. Iterations (Int) <3> (Min = 1)
  6. Length (Int) <32> (Min = 4)

*/

// Generate hash from the provided message
// If you don't provide salt, it will be auto generated
Argon2id.hash("message").then(hash => {
  console.log("Hash: " + hash);
}).catch(err => {
  console.log("Error: " + err);
});

// Generate Encoded hash from the provided message
// Both hash and hashEncoded functions accept the same parameters
Argon2id.hashEncoded("message").then(hashEncoded => {
  console.log("Encoded Hash: " + hashEncoded);
}).catch(err => {
  console.log("Error: " + err);
});

// To get hash from hashEncoded function you can use function called hashDecode
Argon2id.hashDecode("$argon2id$v=19$m=65536,t=3,p=4$OVg1TXI3eTlzcnc2SjIxNw$LtPyv2bn74MJPui2JBPXWx5jXMd1uUv3515emrYSlhM");

// Generate hash from the provided message and salt
Argon2id.hash("message", "3yBtO1brz26g074n").then(hash => {
  console.log("Hash: " + hash);
}).catch(err => {
  console.log("Error: " + err);
});

// To generate random secure salt use randomSalt function
Argon2id.hashEncoded("message", Argon2id.randomSalt()).then(hashEncoded => {
  console.log("Encoded Hash: " + hashEncoded);
}).catch(err => {
  console.log("Error: " + err);
});

// Generate hash from the provided message, salt, iterations, memory cost, parallelism factor and hash length
Argon2id.hashEncoded("message", Argon2id.randomSalt(), 4, 16, 3, 32).then(hashEncoded => {
  console.log("Encoded Hash: " + hashEncoded);
}).catch(err => {
  console.log("Error: " + err);
});

// To validate the message you can use verify function.
// This function accept hashEncoded and message.
Argon2id.verify("$argon2id$v=19$m=65536,t=3,p=4$OVg1TXI3eTlzcnc2SjIxNw$LtPyv2bn74MJPui2JBPXWx5jXMd1uUv3515emrYSlhM", "vbFI6Dfihsw?QnxYOhYxzpxu&vYzTa").then(match => {
  if(match){
    console.log("Message is valid.");
  }else{
    console.log("Message is not valid.");
  }
}).catch(err => {
  console.log("Error: " + err);
});
```
npm package: @rabbit-company/blake2b
Description: Blake2b-512 hash function
Author: Rabbit Company
Latest version: 2.1.0

# Blake2b-JS

A JavaScript (ES6) implementation of the Blake2b-512 cryptographic hash function.

## Usage

### 1. Download the library

```bash
npm i --save @rabbit-company/blake2b
```

### 2. Import the library

```js
import Blake2b from "@rabbit-company/blake2b";
```

### 3. Generate a Hash

```ts
/**
 * Generate a Blake2b hash.
 *
 * @param {string | Uint8Array} message - The input message to hash (required).
 * @param {string | Uint8Array | undefined} secret - An optional secret key for HMAC mode.
 * @param {number} [length=64] - The length of the hash output in bytes (default is 64, max is 64).
 * @param {string | Uint8Array} [salt] - An optional salt value for the hash (must be 16 bytes long).
 * @param {string | Uint8Array} [personal] - An optional personalization value (must be 16 bytes long).
 * @returns {string} - The hexadecimal representation of the hash.
 */

// Generate hash from the provided message
Blake2b.hash("message");

// Generate hash from the provided message and secret key
Blake2b.hash("message", "secretKey");

// Generate hash from the provided message, secret key and length
Blake2b.hash("message", "secretKey", 32);

// Generate hash from the provided message, secret key, length and salt
Blake2b.hash("message", "secretKey", 32, "c32df5f2f3c77a03");

// Generate hash from the provided message, secret key, length, salt and personal
Blake2b.hash(
	"message",
	"secretKey",
	32,
	"c32df5f2f3c77a03",
	"4862f0260a9803da"
);
```

### Parameters

- **message**: The input to be hashed. Can be a string or a Uint8Array.
- **secret**: (Optional) A secret key for HMAC mode. Can be a string or Uint8Array. If not provided, a standard Blake2b hash will be generated.
- **length**: (Optional) The length of the output hash in bytes. Defaults to 64. Must be between 1 and 64.
- **salt**: (Optional) A salt value for the hash. Must be a 16-byte string or Uint8Array.
- **personal**: (Optional) A personalization string for the hash. Must be a 16-byte string or Uint8Array.
npm package: @rabbit-company/downloader
Description: Simple file downloader
Author: Rabbit Company
Latest version: 0.1.2

# Downloader

A powerful library to handle large file downloads with support for multiple runtimes (`Node.js`, `Deno`, `Bun`). The `Downloader` class provides chunked downloads, retry mechanisms, and progress tracking with speed monitoring.

---

## Features

- **Cross-Platform**: Works seamlessly in `Node.js`, `Deno`, and `Bun`.
- **Progress Tracking**: Reports real-time download progress as a percentage.
- **Speed Monitoring**: Calculates download speed in bytes per second.
- **Chunked Downloads**: Downloads files in configurable chunk sizes to handle large files efficiently.
- **Retry Mechanism**: Automatically retries failed chunks with customizable timeout and retry limits.
- **Custom Callbacks**: Receive progress and speed updates via a callback.
- **Flexible Configuration**: Allows fine-tuning of options such as HTTP method, headers, and body data.

---

## Installation

```bash
npm i --save @rabbit-company/downloader
```

## Usage

```js
import { Downloader } from "@rabbit-company/downloader";

const downloader = new Downloader({
	url: "https://example.com/large-file.zip", // URL of the file
	destinationPath: "./downloads/large-file.zip", // Local destination path
	chunkSize: 10 * 1024 * 1024, // Optional: Chunk size (defaults to 10 MB)
	method: HttpMethod.GET, // Optional: HTTP method (defaults to GET)
	retryTimeout: 5000, // Optional: Time to wait before retrying a failed request (default: 5000 ms)
	maxRetries: 120, // Optional: Maximum retries for failed chunks (default: 120)
	headers: {
		Authorization: "Bearer YOUR_AUTH_TOKEN", // Optional: Custom headers (e.g., for authentication)
	},
	body: JSON.stringify({ sending: "json" }), // Optional: The body of the request (useful for POST, PUT, etc.).
});

// Starts the download process. Resolves to true if the download completes successfully, otherwise throws an error.
downloader
	.download((progress, speed) => {
		console.log(`Download progress: ${progress.toFixed(2)}% - ${(speed / 1024).toFixed(2)} KB/s`);
	})
	.then(() => {
		console.log("Download completed successfully!");
	})
	.catch((err) => {
		console.error("Download failed:", err.message);
	});

// Returns the current download progress as a percentage (0-100).
downloader.getProgress();

//Returns the current download speed in bytes per second.
downloader.getDownloadSpeed();
```

## License

This project is licensed under the MIT License. See the [LICENSE](https://github.com/Rabbit-Company/Downloader-JS/blob/main/LICENSE) file for details.
npm package: @rabbit-company/password-entropy
Description: Password entropy calculator
Author: Rabbit Company
Latest version: 2.1.0

# PasswordEntropy-JS

Password entropy implementation in JavaScript (ES6).

This library will calculate the entropy of provided passwords.

## Usage

### 1. Download library
```bash
npm i --save @rabbit-company/password-entropy
```

### 2. Import library
```js
import PasswordEntropy from "@rabbit-company/password-entropy";
```

### 3. Calculate Entropy
```js
PasswordEntropy.calculate(password);
```
npm package: @rabbit-company/password-generator
Description: Password generator
Author: Rabbit Company
Latest version: 2.2.0

# PasswordGenerator-JS

Password generator implemented in JavaScript (ES6).

This library will auto generate random secure passwords.

## Usage

### 1. Download library
```bash
npm i --save @rabbit-company/password-generator
```

### 2. Import library
```js
import PasswordGenerator from "@rabbit-company/password-generator";
```

### 3. Generate Password
```js
/*

  Parameters:
  1. Length (Number) <20>
  2. Uppercase (Bool) <true>
  3. Numbers (Bool) <true>
  4. Symbols (Bool) <true>

*/

// Generate 20 character long password with Uppercase characters, Numbers and Symbols.
PasswordGenerator.generate();

// Generate 30 character long password with Uppercase characters, Numbers and Symbols.
PasswordGenerator.generate(30);

// Generate 50 character long password with Uppercase characters and Numbers.
PasswordGenerator.generate(50, true, true, false);
```
npm package: @rabbit-company/xchacha20
Description: XChaCha20 encryption
Author: Rabbit Company
Latest version: 2.3.0

# XChaCha20-JS

XChaCha20 implementation in JavaScript (ES6).

This library will auto generate random nonce and append it to the encrypted message.

## Usage

### 1. Download library
```bash
npm i --save @rabbit-company/xchacha20
```

### 2. Import library
```js
import XChaCha20 from "@rabbit-company/xchacha20";
```

### 3. Encryption
```js
XChaCha20.encrypt(message, secretKey);
```

### 4. Decryption
```js
XChaCha20.decrypt(message, secretKey);
```