[ 🧹 ] Editorconfig , Querystring Replacement , Shorter Test Video#9
Open
PhoneDroid wants to merge 4 commits into
Open
[ 🧹 ] Editorconfig , Querystring Replacement , Shorter Test Video#9PhoneDroid wants to merge 4 commits into
PhoneDroid wants to merge 4 commits into
Conversation
DjDeveloperr
requested changes
Jul 31, 2023
| url.searchParams.set("html5", "1"); | ||
| let body = await request(url.toString(), options).then((e) => e.text()); | ||
| let info = querystring.decode(body); | ||
| let info = Object.fromEntries([ ... new URLSearchParams(body).entries() ]); |
Owner
There was a problem hiding this comment.
I think you can simply do Object.fromEntries(new URLSearchParams(body))
| .map((e: any) => qs.parse(e)); | ||
| .map((e: any) => new URLSearchParams(e)) | ||
| .map(( params ) => [ ... params.entries() ] ) | ||
| .map(( params ) => Object.fromEntries(params) ); |
Owner
There was a problem hiding this comment.
FYI this is an array, not a lazy iterator where chained maps can combine for less time complexity. This is going to iterate over the params 3 * n times. Just do
.map((e: any) => Object.fromEntries(new URLSearchParams(e)))|
|
||
| [*.md] | ||
|
|
||
| trim_trailing_whitespace = false No newline at end of file |
Owner
There was a problem hiding this comment.
What about this instead? I think the comment at top is unnecessary and the ident size should be 2.
root = true
[*]
end_of_line = lf
insert_final_newline = true
indent_style = space
indent_size = 2
charset = utf-8
trim_trailing_whitespace = true
Owner
|
Thanks for the PR! After it is landed, I will setup formatting & linting via Unrelated but I recommend making PRs from non-main branch, so it allows maintainers to make changes to the PR! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
( Check the inidivual commits for changes instead of the
File Changestab -> editorconfig was applied to all files )closes #10