Homelab, Linux & ABAP (~˘▾˘)~
 

[JavaScript] Funciton to check if something is an array and if not, return it as array

const asArray = x => Array.isArray(x) ? x : [ x ]

Leave a Reply

Your email address will not be published.