Legitcode/legible

Refactor normalization/parsing code

Closed this issue · 3 comments

Hi Zack, love the idea of legible! I was looking through the code and it seems like the parsing mechanism you're using right now is highly dependent on the template literal following a specific structure, e.g. if a user were to pass in the method value as a variable, normalize.js would break. Additionally, the user can't pass any other options on to request such as credentials. Do you mind if I PR a process that I think will allow for a lot more flexibility in formatting as well as accepted request options?

Do you mind if I:

  1. Update .babelrc to use the latest plugin? This removes the need to list transform-async-to-generator in plugins.
  2. Use the transform-object-rest-spread plugin? It's a Stage 3 proposal and will make the code a little more readable.