-
Notifications
You must be signed in to change notification settings - Fork 201
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
Response headers regex #34
Conversation
A little refactoring and semantic, related to `const, let` and right scope of values.
fixed with previous hook `no-cond-assign`, what is not good. In future will propose better.
return new Promise( (resolve, reject) => { | ||
let request = new XMLHttpRequest(); | ||
return new Promise((resolve, reject) => { | ||
const response = () => { |
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.
probably best to leave this as a function declaration so the name doesn't get duplicated.
I sort-of wish the regex and refactor changes were in separate PRs 🙊 |
@developit disagree, check the new commit with current syntax – I saved 1 byte, 😂. |
…aders don't need it."
@developit any issues about PR? |
Ahh no, sorry, I just let this slip. I had meant to do some browser testing. |
Any status? |
Optimized regex for retrieving headers pair.
Saved bytes: 7.
But we can save 1 byte more, if we will consider on next situation.
Do we have real case when
getAllResponseHeaders
returns not strict format of pair?Example:
X-Foo: bar\nX-Foo:baz