arr-cycle

Cycle thru all items in an array.

Usage no npm install needed!

<script type="module">
  import arrCycle from 'https://cdn.skypack.dev/arr-cycle';
</script>

README

arr-cycle

Cycle thru all items in an array.

Install

npm install arr-cycle

Usage

const Cycle = require('arr-cycle');

var items = new Cycle(['foo', 'bar', 'unicorn']);

items.count();
items.curr();
items.prev();
items.next();