-
Notifications
You must be signed in to change notification settings - Fork 7
Implement encoding and decoding functions #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
c6e3b5b to
2160b4d
Compare
spago.dhall
Outdated
| { name = "js-uri" | ||
| , dependencies = [ "console", "effect", "psci-support" ] | ||
| , dependencies = | ||
| [ "console", "effect", "functions", "maybe", "psci-support", "strings" ] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can drop the strings dependency if I apply replacements in JavaScript instead of in PureScript (for the *FormURLComponent functions).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not against this. This library already has some non-trivial FFI bindings (well, they're only just non-trivial 😄) so doing it all in the FFI is fine to me.
|
Once merged, I can make a release, add this to the 0.14 package set, and then:
|
|
I didn’t realise that the longer term ambition is to have this library written in PureScript with no FFI; in this case I think the name js-uri is actually a bit misleading. Or at least, it will be once that happens. |
|
I don't think this library should be rewritten in PureScript, just that it would be ideal for some RFC 3896 encoding / decoding to exist which is not written using the FFI. |
|
I'm pretty sure this is just a stopgap solution so we can get v0.14.0 out the door. |
|
Unless someone disagrees, once I've added some tests and dropped the |
This PR introduces the
encodeanddecodefunctions for URIs and forx-www-form-urlencoded. It solves this comment wrt updating libraries to PureScript 0.14.I've relied on the MDN documentation seen here:
I haven't yet added tests for these functions, but this PR at least allows us to bikeshed on implementation & naming.