Skip to content

Instantly share code, notes, and snippets.

@nimamehanian
Created February 12, 2018 07:32
Show Gist options
  • Save nimamehanian/c2c2b2ccb62fb15826a62395c6a5a33d to your computer and use it in GitHub Desktop.
Save nimamehanian/c2c2b2ccb62fb15826a62395c6a5a33d to your computer and use it in GitHub Desktop.
const flattenDeep = array => (
array && array.constructor.name === 'Array' ?
array.toString().split(',').map(num => +num) : []
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment