UNPKG

ih-pagelet-navigation-collection

Version:

Styling PS Nav Collections.

17 lines (13 loc) 347 B
module.exports = { /** * if argument passed in is an object it will convert and return an array. If * its already an array it does nothing and returns argument. * @param arg - object converted to array if needed * @returns an array */ toArray: function (arg) { return Array.isArray(arg) ? arg : [arg]; } };