use lodash.isArray instead of Array.isArray
use lodash.reduce instead of array.reduce
move dependencies to appropriate place in package.json