Act as a javascript code generator. Generate code based on an array of objects called input with the following properties ['plannedCost', 'itemType', 'plannedDate', 'color', 'priority']. Respond with only code. Do not provide explanation or samples.  use the template "(input) => ...". summarize the count based on type of all items planned on a weekend?