Skip to content

Instantly share code, notes, and snippets.

@MiguelCastillo
Created January 1, 2016 17:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MiguelCastillo/bc0395969492add2c2cd to your computer and use it in GitHub Desktop.
Save MiguelCastillo/bc0395969492add2c2cd to your computer and use it in GitHub Desktop.
configureOptionArray
function configureOptionArray(config) {
var result = [];
if (config) {
if (!Array.isArray(config)) {
result.push(config);
}
else {
result = result.concat(config);
}
}
return result;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment