Revo Docs

Introduction

At revo we love code, and we love beautiful code. This is why we crafted this guide. Feel free to submit PR to this docs repo so we all can discuss and add new guidelines!

General guidelines

Here is the list of the general guidelines we should follow, and no PR should be approved if they are not followed.

Foreach and for loops

Foreach and for loops are strictly forbidden. Whatever you do with a for loop is to achieve something, and this something usually has a name.
Consider using high order functions such as filter , map , reduce , sum
There is an scenario where the foreach loop is allowed, and it is on a view, where you want to run through a list of items and show them. In this case you really are doing what the foreach says, so it totally makes sense.

If - Else

else and for loops are strictly forbidden. Whatever you do with a for loop is to achieve something, and this something usually has a name.
Consider using high order functions such as filter , map , reduce , sum