An array convenience subclass
npm install arc-array```
$ npm install arc-array --save
object. Requires new$3
Shuffles an array in place. $3
Returns a random element from the array$3
Iterates over an array like a map, but treating each callable as async, awaits for all to resolve like a Promise.all`jsconst someArray = ArcArray.wrap([1,2,3]);
const someResolvedResponse = await someArray.pMap(async (val) => {
const response = await someRemoteCall(val);
return response;
})
`$3
Create a string based on the returned values from a callback on each index of an array.callback is a function that receives each value of the array, and is expected to return a value that will be used to create the joined string.
`js
//Example of joinCallback
const items = new ArcArray('item1','item2','item3');
const string = items.joinCallback(function(_val){
return ''+_val+' '
},'');//String returned is:
item1 item2 item3
`Testing
`
npm test
``