Upgrading

This commit is contained in:
James Barnsley
2020-03-13 16:41:44 +13:00
parent d37fa271f3
commit 2ddc966328
11 changed files with 9803 additions and 6534 deletions

View File

@ -1,5 +1,19 @@
import { uriSource } from './helpers';
/**
* Convert an object (ie index) to an array of values
*
* @param object Object
* @return Array
*/
const indexToArray = (index) => {
const array = [];
for (let key in index) {
if (index.hasOwnProperty(key)) array.push(index[key]);
}
return array;
};
/**
* Digest an array of objects and pull into simple array of one property
*
@ -241,6 +255,7 @@ export {
createRange,
sortItems,
shuffle,
indexToArray,
};
export default {
@ -251,4 +266,5 @@ export default {
createRange,
sortItems,
shuffle,
indexToArray,
};