# allocated-dynamic-typedarray

> A typed array whose length() can change.

Latest version **1.0.0** (published 2014-08-21) · MIT license · 0 weekly downloads

## Install

```sh
npm install allocated-dynamic-typedarray
pnpm add allocated-dynamic-typedarray
yarn add allocated-dynamic-typedarray
bun add allocated-dynamic-typedarray
```

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2014-08-21 |
| First published | 2014-08-21 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Drew Petersen |
| Maintainers | kirbysayshi |
| Keywords | typedarray |

## Links

- npm: https://www.npmjs.com/package/allocated-dynamic-typedarray
- Repository: https://github.com/kirbysayshi/allocated-dynamic-typedarray
- Issues: https://github.com/kirbysayshi/allocated-dynamic-typedarray/issues
- npm.io page: https://npm.io/package/allocated-dynamic-typedarray

## Recent versions

- 1.0.0 (latest) — 2014-08-21

## README

allocated-dynamic-typedarray
============================

Allocate an entire array, but automatically track which indices are occupied.

Example
-------

```js
var ADTA = require('allocated-dynamic-typedarray');

var a = new ADTA(64); // maximum size is 64, defaults to Uint32Array
a.length(); // 0
a.push(72);
a.length(); // 1
a.get(0); // 72
a.push(23);
a.push(34);
a.push(56);
a.length() // 4
a.remove(1);
a.length(); // 3
a.toArray(); // [72,56,34]
```

Notice how the order of the items is not guaranteed after a `.remove()`. This is to prevent needing to shift or push all values. If you need functionality otherwise, try a different module.

Pushing a value that would cause the array to exceed it's initial limit silently fails for now, as that's why TypedArrays do.

Since this is backed by a TypedArray, only values that could normally be stored in a TypedArray will succeed.

Contributing
------------

```sh
npm test
```

Pull requests are welcome!

License
-------

MIT

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