@array-like/alloc
Version:
ArrayLike allocation helper functions for JavaScript
30 lines (24 loc) • 2.11 kB
Markdown
:seat: [@array-like/alloc](https://array-like.github.io/alloc)
==
`ArrayLike` allocation helper functions for JavaScript.
See [docs](https://array-like.github.io/alloc/index.html).
```js
import {alloc, malloc, _calloc} from '@array-like/alloc';
alloc(10); // Array
malloc(10); // ArrayBuffer
const calloc = _calloc(Int32Array);
calloc(10); // Int32Array
```
[](https://raw.githubusercontent.com/array-like/alloc/main/LICENSE)
[](https://www.npmjs.org/package/@array-like/alloc)
[](https://github.com/array-like/alloc/actions/workflows/ci:test.yml?query=branch:main)
[](https://david-dm.org/array-like/alloc)
[](https://david-dm.org/array-like/alloc?type=dev)
[](https://github.com/array-like/alloc/issues)
[](https://www.npmjs.org/package/@array-like/alloc)
[](https://codeclimate.com/github/array-like/alloc/issues)
[](https://codeclimate.com/github/array-like/alloc/trends/churn)
[](https://codecov.io/gh/array-like/alloc)
[](https://codeclimate.com/github/array-like/alloc/trends/technical_debt)
[](https://array-like.github.io/alloc/source.html)
[](https://bundlephobia.com/result?p=@array-like/alloc)