const checkArray = val => { if (!Array.isArray(val)) { throw Error('value must be an array'); } }; export default checkArray;