Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> While on the surface that might seem like a workable idea, getting input validation right is going to require more syntax (making it far less clean)

Input validation will go into the router, which I have created for Express, Koa and React. Application code will not have to deal with validation or parsing.

> Specifically, URLs are only ever string data, so without type annotation everything is strings, even if it looks like a number, array, or even more complex data type.

You'd have to pass more complex data types either in body (as JSON) or as parameters with quoting. Current router does however, infer types to the extent of:

  //Params inferred as string, number, boolean and number.
  curl "http://www.example.com/search(Jeswin,20,true,x)?x=100"


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: