Provides a wrapper with helper functions to assist with callback loops

Usage no npm install needed!

<script type="module">
  import arrayWrapper from '';




Simple wrapper around arrays providing a inbuilt interator to assist with callback functions

API Usage

var sampleLinks = ['', '', '']; `` var Wrapper = require('array-wrapper'); `` var links = new Wrapper(sampleLinks); // builds the wrapper

console.log('get first element', links.get()); //gets the first element or the element the wrapper is currently pointing at `` console.log('shift the pointer to the second link',; //shifts the pointer `` console.log('get current element (second element)', links.get()); // prints '', the next element

`` console.log('move the pointer to the previous link', links.previous());

Pointing the pointer to an out of bounds element returns undefined - it does not differentiate between an array with undefined elements and out of bounds elements