var type = items[i].split('=')[0].test(/^\d+$/) ? 'ItemID' : 'Option';
var type = !isNaN(items[i].split('=')[0]) ? 'ItemID' : 'Option';
Please post all new support queries in our New Forum.
Please read this Announcement for details.