fix lint warnings

This commit is contained in:
Randall Schmidt
2020-11-27 23:28:00 -05:00
parent 49741e9608
commit 022626e7f9
4 changed files with 63 additions and 61 deletions

27
classes/headers.js Normal file
View File

@ -0,0 +1,27 @@
class Headers {
constructor(rawHeaders) {
this.rawHeaders = rawHeaders;
}
entries() {
return Object.entries(this.rawHeaders);
}
keys() {
return Object.keys(this.rawHeaders);
}
values() {
return Object.values(this.rawHeaders);
}
get(name) {
return this.rawHeaders[name.toLowerCase()] || null;
}
has(name) {
return !!this.get(name);
}
}
module.exports = Headers;