paulvarache / restify-paginate

9 stars 8 forks source link

Remove forward slash if host provide on URL #16

Closed amandiobm closed 6 years ago

amandiobm commented 6 years ago

I don't know why my server is not providing the last forward slash, so when I generate the links for the pagination this is the result I get http://localhost:8080api/resource/....

With this pull request I used RegExp to remove the last forward slash if host provided. Then add the last forward slash. So now when I generate the links I get http://localhost:8080/api/resource/...