# @timvanscherpenzeel/typedarray-pool

> TypedArray pool implementation

Latest version **0.0.2** (published 2019-04-03) · MIT license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install @timvanscherpenzeel/typedarray-pool
pnpm add @timvanscherpenzeel/typedarray-pool
yarn add @timvanscherpenzeel/typedarray-pool
bun add @timvanscherpenzeel/typedarray-pool
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 0.0.2 |
| Published | 2019-04-03 |
| First published | 2019-04-03 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 217.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Tim van Scherpenzeel |
| Maintainers | timvanscherpenzeel |

## Links

- npm: https://www.npmjs.com/package/@timvanscherpenzeel/typedarray-pool
- npm.io page: https://npm.io/package/@timvanscherpenzeel/typedarray-pool

## Recent versions

- 0.0.2 (latest) — 2019-04-03
- 0.0.1 — 2019-04-03

## README

# TypedArray pool

![](http://img.badgesize.io/TimvanScherpenzeel/typedarray-pool/master/dist/typedarray-pool.cjs.js.svg?compression=gzip&maxAge=60)
[![npm version](https://badge.fury.io/js/%40timvanscherpenzeel%2Ftypedarray-pool.svg)](https://badge.fury.io/js/%40timvanscherpenzeel%2Ftypedarray-pool)
[![dependencies](https://david-dm.org/timvanscherpenzeel/typedarray-pool/typedarray-pool.svg)](https://david-dm.org/timvanscherpenzeel/typedarray-pool)
[![devDependencies](https://david-dm.org/timvanscherpenzeel/typedarray-pool/dev-status.svg)](https://david-dm.org/timvanscherpenzeel/typedarray-pool#info=devDependencies)

A global pool for typed arrays (923 B).

This library is a modern TypeScript port of the original [typedarray-pool](https://github.com/mikolalysenko/typedarray-pool) library by [Mikola Lysenko](https://github.com/mikolalysenko) with some API changes.

## Installation

Make sure you have [Node.js](http://nodejs.org/) installed.

```sh
 $ npm install @timvanscherpenzeel/typedarray-pool
```

## Usage

```js
import { TypedArrayPool } from '@timvanscherpenzeel/typedarray-pool';

const typedArrayPool = new TypedArrayPool();

// Allocate a buffer with at least 128 floats
const f = typedArrayPool.malloc(128, 'FLOAT_32');

// ...

// When done, release buffer back to pool
typedArrayPool.free(f);
```

## Development

```sh
$ yarn start

$ yarn lint

$ yarn test

$ yarn build
```

## Licence

My work is released under the [MIT license](https://raw.githubusercontent.com/TimvanScherpenzeel/typedarray-pool/master/LICENSE).

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