TrochaJS
TLDR It replace long, ugly, repetitibe url strings with clean objects
An standalone/agnostic library to print valid URLs, ideal for RESTful & SPA frontEnd big projects.
Why this library exist
This library take inspiration from Ruby routing system, where you describe the routes via a simple name tree and call those routes via dinamic function naming, preventing use of string in views and controllers.
Ugly code example
theRoute = 'https://my.domain.com.co/product/' + myProductid + '/buy' + '?quantity=' + sellquantity
With Trocha
theRoute = myRoutesproductbuy
This will print
https://my.domain.com.co/product/<product_id>/buy?quantity=<sell.quantity>
Please see the full docs at here: https://dfoxpro.github.io/trochaJS