array-insert-random

Inserts items randomly into an array.

Usage no npm install needed!

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

README

array-insert-random

Inserts items randomly into an array.

Usage

const arrayInsertRandom = require('array-insert-random')

arrayInsertRandom(array, items)

Parameters:

  • array - An array to insert into.
  • items - An object, or an array of objects, to insert into random positions in the array.

License

MIT