array-fixed

Array with a Fixed Preallocated Length

Usage no npm install needed!

<script type="module">
  import arrayFixed from 'https://cdn.skypack.dev/array-fixed';
</script>

README

ArrayFixed

ArrayFixed is a fixed length sparse JavaScript array. The main advantage of a fixed length sparse array, is that we maintain a count along with the array length. Extending on the fixed length sparse array, we create a fixed length sparse array that is dense in one direction (left or right). The ArrayFixedDense ensures that the array is kept dense in one particular direction.