Refactor normalization/parsing code
Closed this issue · 3 comments
raygesualdo commented
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?
zackify commented
Yes! That would be amazing. I could learn a lot from your code.
…On Fri, Dec 9, 2016 at 13:38 Ray Gesualdo ***@***.***> wrote:
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?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#2>, or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAbacCHaLxMmeMqaMiKIEvvZnSXKdvHMks5rGaARgaJpZM4LJO0W>
.
raygesualdo commented
Do you mind if I:
- Update
.babelrc
to use thelatest
plugin? This removes the need to listtransform-async-to-generator
in plugins. - Use the
transform-object-rest-spread
plugin? It's a Stage 3 proposal and will make the code a little more readable.
zackify commented
Go for it. I think if this is something you plan on helping with I'll move
it over to an org on here so it's not under my name. I just want to see if
it gains any traction first :) I'll add you as a contributor.
…On Fri, Dec 9, 2016 at 14:02 Ray Gesualdo ***@***.***> wrote:
Do you mind if I:
1. Update the 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.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#2 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAbacFnd5dRSk28SzlEzIZXh_0eledgzks5rGaXLgaJpZM4LJO0W>
.