UNPKG

@nozbe/watermelondb

Version:

Build powerful React Native and React web apps that scale from hundreds to tens of thousands of records and remain fast

19 lines (14 loc) 318 B
// inspired by ramda and rambda /* eslint-disable */ export default function unnest(arr) { var result = [] for (var i = 0, l = arr.length; i < l; i++) { var value = arr[i] if (Array.isArray(value)) { result = result.concat(value) } else { result.push(value) } } return result }