open-index/open-npm huggingface dataset:
npm package: @gimpel/streebog
Description: Streebog (GOST R 34.11-2018) cryptographic hash function with streaming support
Author: Gimpel Kirill
Latest version: 0.0.1

# Streebog Hash Algorithm

[![npm version](https://img.shields.io/npm/v/@gimpel/streebog.svg)](https://www.npmjs.com/package/@gimpel/streebog)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

Implementation of the [GOST R 34.11–2018 (Streebog)](https://meganorm.ru/Data2/1/4293732/4293732953.pdf) hashing algorithm in JavaScript. Supports generating 256-bit and 512-bit hash values.

Works in both **Node.js** and **browsers**.

## Installation

```bash
npm install @gimpel/streebog
```

## Usage

### Incremental hashing (streaming mode)

```javascript
import { Streebog } from '@gimpel/streebog';

const hash512 = new Streebog(512)
  .update('Hello, ')
  .update('World!')
  .digest('hex');

console.log(hash512); 
```

The hash is computed step-by-step as data is received, which allows processing large volumes of information without loading the entire content into memory.

Data passed to `update()` accumulates in an internal buffer. When the accumulated data reaches the block size — **512 bits (64 bytes)** — the block is immediately processed by the algorithm. This way, the library doesn’t keep the entire input in memory.

### One-line hash calculation

```javascript
import { Streebog } from '@gimpel/streebog';

const hash256 = Streebog.hash('Hello, World!', 256, 'hex');
console.log(hash256);
```

### Getting the result as a Uint8Array

```javascript
import { Streebog } from '@gimpel/streebog';

const bytes = Streebog.hash('Hello, World!', 512, 'buffer');
console.log(bytes);
```
npm package: @gimwa/next-page-transition
Description: A page transition component for Next.js in appdir mode, using framer-motion for animation support.
Author: Gimwa Chan
Latest version: 1.0.3

# @gimwa/next-page-transition

## Description

A page transition component for Next.js in appdir mode, using framer-motion for animation support.

## Demo
[codesandbox](https://codesandbox.io/p/sandbox/affectionate-carlos-7z9p8s?file=%2Fapp%2Ftest%2Fpage.tsx%3A52%2C20)

## Installation

```bash
npm install @gimwa/next-page-transition
```

## Usage

```javascript
import NextPageTransition from '@gimwa/next-page-transition';

// Your component here
```

## Features

- Smooth page transitions for Next.js applications.
- Built-in support for framer-motion animations.
- Only test works well in appdir mode.

## API

Props
- initial: The initial animation state. Default is { opacity: 0 }.
- animate: The state that the component should animate to. Default is { opacity: 1 }.
- exit: The state to animate to when the component is exiting. Default is { opacity: 0 }.


## Example

```tsx
import NextPageTransition from '@gimwa/next-page-transition';

// In your component
<NextPageTransition initial={{ opacity: 0 }} animate={{ opacity: 1 }} exit={{ opacity: 0 }}>
  {/* Your page content here */}
</NextPageTransition>
```

## Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

## License

[MIT](https://choosealicense.com/licenses/mit/)
npm package: @gin0606/form-validator
Description: Validator for form value
Author: gin0606
Latest version: 0.2.2

# form-validator-js
## Installation
```sh
npm install --save @gin0606/form-validator

or

yarn add @gin0606/form-validator
```

## Usage
```js
import { FormValidator, Errors } from '@gin0606/form-validator';

class MustNotBeEmptyError extends ValidationError {
}
class MaxLengthError extends ValidationError {
  max: number
  constructor(max: number) {
    super();
    this.max = max;
  }
}

const Rules = {
  cantBeEmpty: () => ({
    verify: (v: string): Promise<?ValidationError> => Promise.resolve((isNotEmpty(v) ? null : new MustNotBeEmptyError())),
  }),
  maxLength: (max: number) => ({
    verify: (v: string): Promise<?ValidationError> => {
      let error = null;
      if (v && v.length > max) {
        error = new MaxLengthError(max);
      }
      return Promise.resolve(error);
    },
  }),
  acceptEmail: () => ({
    verify: (v: string): Promise<?ValidationError> => {
      if (!v) { return Promise.resolve(null); }
      if (isEmail(v)) { return Promise.resolve(null); }
      return Promise.resolve(new AcceptEmailError());
    },
  }),
};

const validator = new FormValidator({
  name: [Rules.cantBeEmpty(), Rules.maxLength(8)],
  message: [Rules.maxLength(16)],
});

validator.validate({
  name: 'gin0606',
  message: 'hello',
}).then((result) => {
  const errors = result.errors();
  console.log(errors.name); // => []
  console.log(errors.email); // => []
  console.log(errors.message); // => []
});

validator.validate({
  name: 'gin060606',
  message: 'hello hello hello hello',
}).then((result) => {
  const errors = result.errors();
  console.log(errors.name[0] instanceof MaxLengthError); // => true
  console.log(errors.message[0] instanceof MaxLengthError); // => true
});

validator.validate({
}).then((result) => {
  const errors = result.errors();
  console.log(!!errors.name.find(e => e instanceof MustNotBeEmptyError)); // => true
  console.log(errors.message); // => []
});
```
npm package: @gin0606/react-stateless-input
Description: `<Input />` Component for creating a stateless form
Author: gin0606
Latest version: 1.0.0

# react-stateless-input [![Build Status](https://travis-ci.org/gin0606/react-stateless-input.svg?branch=master)](https://travis-ci.org/gin0606/react-stateless-input)
`<Input />` Component for creating a stateless form

# Installation
```
npm install --save @gin0606/react-stateless-input
```

# Usage
```js
class FooForm extends React.Component {
  render() {
    return (
      <div className="form-horizontal">
        <div className="box-body">
          <div className="form-group">
            <span className="col-sm-5 control-label" htmlFor="FeedbackFormLabel">label</span>
            <div className="col-sm-7">
              <Input
                type="text"
                value={this.props.value}
                className="form-control"
                placeholder="input some text"
                onChange={(e) => {
                  this.props.onChangeValue(e.target.value);
                }}
              />
            </div>
          </div>
          <div className="box-footer">
            <button className="btn btn-primary pull-right" onClick={this.onSubmit}>
              Submit
            </button>
          </div>
        </div>
      </div>
    );
  }
}
```
npm package: @gin93r/to-bool
Description: Simple module to convert values to boolean values.
Author: Carl Morlock
Latest version: 0.1.1

To Bool
=========

A small library that converts typical "boolean" values to boolean

## Installation

  `npm install @gin93r/to-bool`

## Usage

    var toBool = require('@gin93r/to-bool');

    var b = toBool(0, [options]}); // false
  
  
### Options

 `treatUndefinedAsFalse` | *default*: `true`<br>
 `treatNullAsFalse` | *default*: `true`

When true, `undefined` and `null` values will be returned as `false`.

When false, `undefined` and `null` will be returned as normal.

    var b = toBool(undefined, {treatUndefinedAsFalse:false}) // undefined
    var b = toBool(null, {treatNullAsFalse:false}) // null


## Tests

  `npm test`

## Contributing

In lieu of a formal style guide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code.

[![Build Status](https://travis-ci.org/gin93r/to-bool.svg?branch=master)](https://travis-ci.org/gin93r/to-bool)
[![Coverage Status](https://coveralls.io/repos/github/gin93r/to-bool/badge.svg?branch=master)](https://coveralls.io/github/gin93r/to-bool?branch=master)
npm package: @ginakoul/easy-validation
Description: Validation library with custom validation and error message options
Author: ginakoul
Latest version: 0.0.3

# Easy Validation

## Package installation

```bash
npm i @ginakoul/easy-validation
```

## Import menu-drop to project

### Import Css

```bash
import "@ginakoul/simple-carousel/dist/easy-validation.css";
```

### Import Js

```bash
import {
  ErrorMessages,
  CustomValidations,
  Validation,
} from "@ginakoul/easy-validation/dist/easy-validation.js";
```

## Use inside project

- Add **novalidate** to form element

- Add **inline** attribute to form element in order to make the error messages inline (optional).

- Add validation attributes to fields

### Custom error messages (optional)

- The **key** must be the **id** of the field

- The keys inside the inner object must be a **validation attribute name**

- Use **ErrorMessages.add()** to add custom error messages to validation

```bash
const validationErrors = {
  email: {
    required: "Please enter a email address",
    pattern: "Please enter a valid email address",
  },
  postalCode: {
    required: "Please enter a postal code",
    pattern: "Please enter a valid postal code",
  },
  country: {
    required: "Please select a country",
  },
  password: {
    required: "Please enter a password",
    pattern:
      "Password must be between 8 and 20 characters long, include at least one letter, one number, and one special character (@$!%*?&).",
  },
  confirmPassword: {
    required: "Please enter a password",
    pattern:
      "Password must be between 8 and 20 characters long, include at least one letter, one number, and one special character (@$!%*?&).",
  },
};

ErrorMessages.add(validationErrors);
```

### Custom validation (optional)

- Use **CustomValidations.add()** to add custom validation

**Values added:**

1. The first value must be the field to which the validation applies

2. The second value must be the function that contains the custom validation

3. The third value must be the the custom validation error

```bash
  const confirmPassword = document.querySelector("#confirmPassword");
  CustomValidations.add(
    confirmPassword,
    function () {
      const password = document.querySelector("#password");
      const confirmPassword = document.querySelector("#confirmPassword");
      return password.value === confirmPassword.value;
    },
    "Custom error",
  );
```

### Validation initialization

- Use **Validation.init()** to initialize the validation

- Must be used after the custom messages and custom valiations are added (both are optional)

```bash
  Validation.init();
```
npm package: @ginakoul/simple-carousel
Description: Simple carousel with navigation and autoplay
Author: ginakoul
Latest version: 0.0.1

# Simple Carousel

## Package installation

```bash
npm i @ginakoul/simple-carousel
```

## Import menu-drop to project

### Import Css

```bash
import "@ginakoul/simple-carousel/dist/simple-carousel.css";
```

### Import Js

```bash
import { SimpleCarousel } from "@ginakoul/simple-carousel/dist/simple-carousel.js";
SimpleCarousel.init();
```

## Use inside project

- Add class **simple-carousel** to element that wraps the slides, in order

- Add class **simple-slide** to each slide

```bash
  <div class="simple-carousel">
    <div class="simple-slide">
      <img src="" alt="">
    </div>
    <div class="simple-slide">
      <img src="" alt="">
    </div>
  </div>
```

**_Optional:_**

- Add class **fit** to element that wraps the slide, in order to make the images inside the slide cover the width and height of the carousel

- Add class **infinite** to element that wraps the slides, in order to make carousel loop

- Add class **autoplay** to element that wraps the slides, in order to make carousel slide every 5 seconds

## Change basic carousel styling

To change the basic styling of the menu add the variables you want to change to the :root of your css file

```bash
:root {
    --simple-carousel-width: <Only works with class fit>;
    --simple-carousel-height: <Only works with class fit>;
    --simple-carousel-arrow-bg: <Carousel arrow background>;
    --simple-carousel-arrow-hover-bg: <Carousel arrow hover background>;
    --simple-carousel-arrow-disabled-bg: <Carousel arrow disabled background>;
    --simple-carousel-arrow-color: <Carousel arrow color>;
}
```
npm package: @gincat-digital/eslint-config-base
Description: Custom ESLint plugin created specifically for projects developed at Gincat Digital. It provides a set of predefined configurations for enforcing coding standards and best practices in JavaScript and TypeScript codebases.
Author: Braian Rosas
Latest version: 0.0.1

# Gincat Digital ESLint Plugin (base)

## Overview

The Gincat Digital ESLint Plugin is a custom ESLint plugin created specifically for projects developed at Gincat Digital. It provides a set of predefined configurations for enforcing coding standards and best practices in JavaScript and TypeScript codebases.

## Features

- **Consistent Coding Standards**: Enforce consistent coding standards across all Gincat Digital projects.
- **Best Practices**: Encourage the use of best practices and patterns in JavaScript and TypeScript development.
- **Customizable Configurations**: Easily customize configurations based on project requirements.
- **Integration with Build Pipelines**: Seamlessly integrate with build pipelines for automated code quality checks.

## Installation

You can install the Gincat Digital ESLint Plugin via npm:

```bash
npm install --save-dev @gincat-digital/eslint-config-base
```

## Usage

To use the plugin, simply extend the provided configurations in your ESLint configuration file:

```json
{
  "extends": [
    "@gincat-digital/eslint-config-base",
  ]
}
```

## License

This project is licensed under the MIT License - see the [LICENSE.txt](LICENSE.txt) file for details.
npm package: @gincat/eslint-core
Description: This is a package designed to enforce code standards for internal proyects at Gincat Digital. It contains all the necessary ESLint rules for JavaScript and TypeScript projects that follow the coding conventions established by our group. This package ensur
Author: Braian Rosas
Latest version: 0.0.4

# @gincat/eslint-core

This is a package designed to enforce code standards for internal proyects at Gincat Digital. It contains all the necessary ESLint rules for JavaScript and TypeScript projects that follow the coding conventions established by our group. This package ensures that code adheres to a consistent style, promoting maintainability, readability, and best practices across all projects.

## Installation

Install `@gincat/eslint-core` with npm:

```bash
npm install --save-dev @gincat/eslint-core 
```

Make sure to have installed ESLint v9.22 or greater for full compatibility.

## Usage

To use the ESLint rules from `@gincat/eslint-core` in your project, you need to extend the ESLint configuration by adding it to your `eslint.config.js` or equivalent ESLint configuration file.

### Example configuration for JavaScript projects:

```javascript
import { defineConfig } from 'eslint/config';
import { jsConfigs } from '@gincat/eslint-core';

export default defineConfig(
	...jsConfigs,
	// Your other configurations...
);
```

### Example configuration for TypeScript projects:

The TypeScript configuration extends all base rules from `jsConfigs` so you don't have to include it in your configs.

```typescript
import tseslint from 'typescript-eslint';
import { tsConfigs } from '@gincat/eslint-core';

export default tseslint.config(
	...tsConfigs,
	{
		languageOptions: {
			parserOptions: { project: './tsconfig.json' },
			parser: tseslint.parser,
		},
	},
	// Your other configurations...
);
```

## Available Rules

This package includes the base linting rules that are specific to the coding style and standards used by Gincat Digital. These rules cover various aspects of JavaScript and TypeScript code, such as:

- Code formatting
- Best practices
- Error handling
- Variable declarations and naming conventions
- Function and method usage
- Imports and exports
- TypeScript-specific rules

For a complete list of the rules included in this package, you can refer to the configuration or consult the code within the package itself.

## Plugins Included

Plugins used in JavaScript configs:

```
@stylistic/eslint-plugin-js
eslint-plugin-import
```

Plugins used in TypeScript configs:

```
@stylistic/eslint-plugin-js
@stylistic/eslint-plugin-ts
eslint-plugin-import
typescript-eslint
```

## Compatibility

- JavaScript (ES6+)
- TypeScript (with `@typescript-eslint/parser`)
- ESlint 9.22+

Ensure you have the necessary dependencies for TypeScript if you are working with TypeScript files.

## License

This repository is licensed under the MIT License. See the [LICENSE](./LICENSE.md) file for more details.
npm package: @gincat/eslint-react
Description: ESLint configuration package for React projects at Gincat Digital, enforcing coding standards and best practices for JavaScript and TypeScript.
Author: Braian Rosas
Latest version: 0.0.2

# @gincat/eslint-react

This is a package designed to enforce code standards for internal proyects at Gincat Digital using React framework. It contains all the necessary ESLint rules for JavaScript/TypeScript with React projects that follow the coding conventions established by our group. This package ensures that code adheres to a consistent style, promoting maintainability, readability, and best practices across all projects.

## Installation

Install `@gincat/eslint-react` with npm:

```bash
npm install --save-dev @gincat/eslint-react 
```

Make sure to have installed ESLint v9.22 or greater for full compatibility.

## Usage

To use the ESLint rules from `@gincat/eslint-react` in your project, you need to extend the ESLint configuration by adding it to your `eslint.config.js` or equivalent ESLint configuration file.

### Example configuration for JavaScript projects:

```javascript
import { defineConfig } from 'eslint/config';
import { reactConfigs } from '@gincat/eslint-react';

export default defineConfig(
	...reactConfigs,
	// Your other configurations...
);
```

### Example configuration for TypeScript projects:

The TypeScript configuration extends all base rules from `reactConfigs` so you don't have to include it in your configs.

```typescript
import tseslint from 'typescript-eslint';
import { tsReactConfigs } from '@gincat/eslint-react';

export default tseslint.config(
	...tsReactConfigs,
	{
		languageOptions: {
			parserOptions: { project: './tsconfig.json' },
			parser: tseslint.parser,
		},
	},
	// Your other configurations...
);
```

## Available Rules

This package includes the base linting rules that are specific to the coding style and standards used by Gincat Digital. These rules cover various aspects of JavaScript and TypeScript code using the famous React framework, such as:

- Code formatting
- Best practices
- Error handling
- Variable declarations and naming conventions
- Function and method usage
- Imports and exports
- TypeScript-specific rules
- React-specific rules

For a complete list of the rules included in this package, you can refer to the configuration or consult the code within the package itself.

## Plugins Included

This package extends our `@gincat/eslint-core` shared configuration which contains all base rules for both JavaScript and TypeScript lined with our code standards.

```
@gincat/eslint-core
eslint-plugin-react
```

## Compatibility

- JavaScript (ES6+)
- TypeScript (with `@typescript-eslint/parser`)
- ESlint 9.22+

Ensure you have the necessary dependencies for TypeScript if you are working with TypeScript files.

## License

This repository is licensed under the MIT License. See the [LICENSE](./LICENSE.md) file for more details.