# @arcade2d/utils

> Provides game-related utilities like random number generation, efficient lists structures, etc.

Latest version **0.1.1** (published 2022-08-08) · MIT license · 0 weekly downloads

## Install

```sh
npm install @arcade2d/utils
pnpm add @arcade2d/utils
yarn add @arcade2d/utils
bun add @arcade2d/utils
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.1 |
| Published | 2022-08-08 |
| First published | 2022-08-08 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 14.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Marty Wallace |
| Maintainers | martywallace |

## Links

- npm: https://www.npmjs.com/package/@arcade2d/utils
- Repository: https://gitlab.com/arcade2d/utils
- Homepage: https://gitlab.com/arcade2d/utils#readme
- Issues: https://gitlab.com/arcade2d/utils/issues
- npm.io page: https://npm.io/package/@arcade2d/utils

## Recent versions

- 0.1.1 (latest) — 2022-08-08
- 0.1.0 — 2022-08-08

## README

# @arcade2d/utils

![Coverage](https://gitlab.com/arcade2d/utils/badges/master/coverage.svg?key_text=Coverage) ![Latest Release](https://gitlab.com/arcade2d/utils/-/badges/release.svg)

[Repository](https://gitlab.com/arcade2d/utils) &middot; [Website](https://arcade2d.com)

Game related utilities.

## Installation

```bash
$ yarn add @arcade2d/utils
```

## Examples

### Efficient Mapped Lists

```typescript
const list = new MappedList<number, string>();

list.add(123, 'abc');
list.add(456, 'def');

for (const { key, value } of list) {
  console.log(key, value);
}
```

### Random Value Generation

```typescript
const random = new RandomValueProvider();

console.log(random.generate()); // Value between 0 and <1.
console.log(random.inRectangle(10, 20, 100, 150)); // [x, y] tuple between the specified rectangle.
```

---
_Source: https://npm.io/package/@arcade2d/utils · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
