open-index/open-npm huggingface dataset:
npm package: @jmleep/carousel
Description: A simple carousel utility to handle typical needs.
Author: Jordan Leeper
Latest version: 1.0.2

# @jmleep/carousel

A simple carousel utility to handle typical needs.

## Installation

`npm i @jmleep/carousel`

## Usage

Create a carousel object with the desired iterable items.

```ts
// with default speed of 1000ms
const carousel = new Carousel(["item1", "item2", "item3"])

function onActiveItemChange(activeItem: string) {
  console.log(activeItem)
}

// with 5000ms speed
const carousel2 = new Carousel(
  ["item1", "item2", "item3"],
  onActiveItemChange,
  5000
)
```

Use the play/pause functions to start and stop the carousel

```ts
carousel.play()

carousel.pause()
```

Access the active item by using the activeItem property or by providing a callback function to the Carousel to be notified of changes to the active item. Access the playing state (boolean) by using the isPlaying property or by providing a callback function to the onPlayingStateChange function.

```ts
const active = carousel.activeItem
const isPlaying = carousel.isPlaying

function onActiveItemChange(activeItem: string) {
  console.log(activeItem)
}

// with 5000ms speed
const carousel2 = new Carousel(
  ["item1", "item2", "item3"],
  onActiveItemChange,
  5000
)
```

Manually move through the carousel items by using the next/previous functions

```ts
carousel.next()

carousel.previous()
```

Update the carousel speed

```ts
carousel.setSpeed(2000)
```

### React Example

```js
const [active, setActive] = useState("")
const [carousel, setCarousel] = useState()

useEffect(() => {
  setCarousel(
    new Carousel(["first", "second", "third", "fourth"], (i) => {
      console.log(i)
      setActive(i)
    })
  )
}, [])

return (
  <div>
    {active}
    <button onClick={() => carousel.play()}>play</button>
    <button onClick={() => carousel.pause()}>pause</button>
    <button onClick={() => carousel.next()}>next</button>
    <button onClick={() => carousel.previous()}>previous</button>
  </div>
)
```
npm package: @jmmaa/pino
Description: Collection of formulas in Toram Online
Author: jmmaa
Latest version: 0.0.3-dev

# Pino

A collection of Toram Online formulas.

> still in development!

### Install

```
npm i @jmmaa/pino@0.0.2-dev
```

### Example

```typescript
import * as pino from "@jmmaa/pino";

const level = 275;
const totalVIT = 1;

pino.baseMaxHP(level, totalVIT); // 2238
```

### Credits

- [Coryn Club](https://coryn.club/)
- [Phantom Library Discord](https://discord.gg/86vXu7MHce)
- [Defensive Damage Calculation Guide by Joji](https://docs.google.com/presentation/d/1r9-SNWPAki2OdhRK5bDB-n-0IITVf-Oi3My3BDAezrQ/edit#slide=id.g8cac6294a0_10_17)
npm package: @jmmaa/reliza
Description: an easy-to-use library for status and damage calculation in Toram Online
Author: jmmaa
Latest version: 0.0.1-dev

# Reliza

A status calculation library for Toram Online

> still in development!

### Quick Example

```ts
import { calculate } from "reliza";

const myCharacter = calculate({
  properties: {
    STR: 247,
    AGI: 465,
  },
});

console.log(myCharacter.totalCriticalDamage); // 221
```

## Todo

- [ ] Damage calculation
- [ ] More precise calculations