mercredi 28 octobre 2015

How to avoid lots of if-else in javascript (nodejs) [on hold]

Based on a parameter, function should select a json file out of more 100 json and fire a query to other system.

There will lots of query around in hundreds.

Obviously if else and switch won't be manageable. I took a look for strategy patten in the javascript.

Thanks in advance for any suggestion for this problem.

Aucun commentaire:

Enregistrer un commentaire