Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function arrayify(any){
if (any === undefined){
return [];
} else if (t.isArrayLike(any)){
return Array.prototype.slice.call(any);
} else {
return Array.isArray(any) ? any : [ any ];
}
}
function arrayify (input) {
const t = require('typical')
if (Array.isArray(input)) {
return input
} else {
if (input === undefined) {
return []
} else if (t.isArrayLike(input)) {
return Array.prototype.slice.call(input)
} else {
return [ input ]
}
}
}
function arrayify(any){
if (any === null || any === undefined){
return [];
} else if (t.isArrayLike(any)){
return Array.prototype.slice.call(any);
} else {
return Array.isArray(any) ? any : [ any ];
}
}