list-to-matrix

Convert list to matrix

Usage no npm install needed!

<script type="module">
  import listToMatrix from 'https://cdn.skypack.dev/list-to-matrix';
</script>

README

Convert list to matrix

listToMatrix([1, 2, 3, 4, 5, 6, 7, 8, 9], 3)
// => [[1, 2, 3], [4, 5, 6], [7, 8, 9]]