Skip to content

Instantly share code, notes, and snippets.

@georgeportillo
Created April 4, 2017 02:16
Show Gist options
  • Save georgeportillo/a12249425de019016f27106fdc1c4fea to your computer and use it in GitHub Desktop.
Save georgeportillo/a12249425de019016f27106fdc1c4fea to your computer and use it in GitHub Desktop.
service.expand = function(input) {
let output = [];
let tempArray = input.slice();
tempArray.forEach((data, index) => {
if(data.length > 0) {
output.push.apply(output, data);
} else {
output.push(data);
}
});
return output;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment