Create a javascript/node.js API endpoint that accepts a json payload of cron strings, and returns a json payload of valid dates for these strings. Include any applicable tests for this endpoint using the testing platform of your choice.
Assume in our client software that we have a model defined as a "Frequency"
Each frequency contains two attributes: <string> name
and <Array> crons
. The name is guaranteed to be unique and the cron is a javascript array of strings (with cron format of "* * * * * *" representing "[sec] [min] [hr] [date] [month] [day of week]"). These cron strings determine when models implementing this frequency are processed. In this example, all cron strings will have "0 0 0" as the first 3 values, as we are interested only in dates, not times.