open-index/open-npm huggingface dataset:
npm package: @mihail_amosov/factorial-package
Description: A simple package to calculate the factorial of a number
Author: Mihail Amosov
Latest version: 1.0.3

# Factorial Package

A simple package to calculate the factorial of a number.

## Installation

To install the package, run:

```bash
npm install factorial-package
```

## Usage
Import the package and use the factorial function:

```js
const factorial = require('factorial-package');

console.log(factorial(5));
```
npm package: @mihailgeorgiev94/react-accordion
Description: Accordion component for React
Latest version: 1.0.9

# React Accordion [![npm](https://img.shields.io/npm/v/@mihailgeorgiev94/react-accordion)](https://www.npmjs.com/package/@mihailgeorgiev94/react-accordion)

# Installation

```sh
npm i @mihailgeorgiev94/react-accordion
```

# Example

```javascript
import React from 'react';

import Accordion from '@mihailgeorgiev94/react-accordion'
import './App.css';

function App() {
  return (
    <div className="App">
      <div className="accordion-container">
        <Accordion allowMultipleOpen>
          <Accordion.Section title="Lorem">
            <p>
              Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et
              dolore magna aliqua
            </p>
          </Accordion.Section>
          <Accordion.Section isOpen title="Title">
            <p>Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium,</p>
          </Accordion.Section>
        </Accordion>
      </div>
    </div>
  );
}

export default App;

```

# API

|Accordion|type|description|
|---|---|---|
|allowMultipleOpen|Boolean|Allows for multiple sections to be open at the same time|


|Accordion.Section|type|description|
|---|---|---|
|isOpen|Boolean|Specifies default state for section. If allowMultipleOpen is false only the first section will be open|
|title|String|Text for header of section|
|children|String; Number; Element|Displayed information in description of section|
npm package: @mihaimacreamav/next-view-transitions
Description: View Transitions API for Next.js App Router
Author: Shu Ding
Latest version: 0.3.4

# next-view-transitions

Use [View Transitions API](https://developer.mozilla.org/en-US/docs/Web/API/View_Transitions_API) in Next.js App Router.

[**Demo**](https://next-view-transitions.vercel.app).

## Disclaimer

This library is aimed at basic use cases of View Transitions and Next.js App Router. With more complex applications and use cases like concurrent rendering, Suspense and streaming, new primitives and APIs still need to be developed into the core of React and Next.js in the future ([more](https://twitter.com/shuding_/status/1779583281920344448)).

## Installation

Use your favorite package manager to install the `next-view-transitions` package. For example:

```bash
pnpm install next-view-transitions
```

## Usage

Wrap your content with the `<ViewTransitions>` component inside the layout file:

```jsx
import { ViewTransitions } from 'next-view-transitions'

export default function Layout({ children }) {
  return (
    <ViewTransitions>
      <html lang='en'>
        <body>
          {children}
        </body>
      </html>
    </ViewTransitions>
  )
}
```

Then, use the `<Link>` component for links that need to trigger a view transition:

```jsx
import { Link } from 'next-view-transitions'

export default function Component() {
  return (
    <div>
      <Link href='/about'>Go to /about</Link>
    </div>
  )
}
```

Or use the `useTransitionRouter` hook for programmatic navigation:

```jsx
import { useTransitionRouter } from 'next-view-transitions'

export default function Component() {
  const router = useTransitionRouter()

  return (
    <div>
      <button onClick={() => {
        // All Next.js router methods are supported
        router.push('/about')
      }}>Go to /about</button>
    </div>
  )
}
```

That's it!

## License

MIT.
npm package: @mihajlomilojevic/ai-hate
Description: Ai Hate Speech Detector is a tool that uses AI to analyze text and identify hate speech. It provides educational responses to promote understanding and discourage hate speech.
Author: Mihajlo Milojević
Latest version: 0.1.2

# Google Build With AI Hate Detection and Response Generation

This project is our solution to Google's AI Hackathon. It provides an interface to detect hate speech in text and generate positive and educational responses.

## Usage

Import the ```HateSpeechAI``` class. Create an instance and pass it an ```API_KEY``` and optionally a model to use.

```
ai = new HateSpeechAI("YOUR_API_KEY")
```

Then call the ```checkHateSpeech``` method on the instance.

```
ai.checkHateSpeech(inputText).then((response) => {
    if (!response) {
        console.log("No hate speech detected.");
    } else {
        console.log("Hate speech detected: " + response);
    }
}).catch((error) => {
    console.error(error);
});
```

The method returns ```null``` if no hate speech is detected or a string that represents a response to the hate speech.

## Licence

This package is under MIT licence.
npm package: @mihalcan/shallow-render-schematics
Description: Add shallow-render to an Angular CLI project
Author: Andrei Mihalciuc
Latest version: 0.0.2

# Schematics for shallow-render
Add [shallow-render](https://github.com/getsaf/shallow-render) to an Angular CLI project

This schematic will:

- install shallow-render
- override [Angular component schematics](https://angular.io/cli/generate#component) to use shallow-render instead of TestBed

## Usage 🚀

Run as one command in an Angular CLI app directory. Note this will add the schematic as a dev dependency to your project.

```shell
ng add @mihalcan/shallow-render-schematics
```

Script will prompt for shallow-render version to install (by default the latest version is installed). Please check [Angular and shallow-render compatibility list](https://github.com/getsaf/shallow-render#angular-version-support). 

```shell script
Please provide shallow-render version to install or hit Enter to install the latest:
```

After installation, executing `ng g c test-component` or `ng generate component test-component` will generate spec file with the following content:
```typescript
import { TestComponentComponent } from './test-component.component';
import { AppModule } from '../app.module';
import { Shallow } from 'shallow-render';

describe('TestComponentComponent', () => {
  let shallow: Shallow<TestComponentComponent>;

  beforeEach(() => {
    shallow = new Shallow(TestComponentComponent, AppModule);
  });

  it('should create', async () => {
    const { find } = await shallow.render('<app-test-component></app-test-component>');
    expect(find('p')).toHaveFound(1);
  });
});

```
## ng add options

| Option | Description |
| ------- | -------------- |
| skipInstall     | If `true` package.json will be update but packages won't be installed. Default is `false`.             |
| setAsDefaultCollection     | If `false` will not set cli default collection. In this case you need to reference package name `ng g @mihalcan/shallow-render-schematics:component`. Default is `true`.             |