mirror of
https://github.com/honojs/hono.git
synced 2024-11-28 00:26:24 +01:00
refactor(context): use simple for-of syntax (#3598)
This commit is contained in:
parent
ae99d86d89
commit
224ec367f3
@ -266,8 +266,7 @@ export const TEXT_PLAIN = 'text/plain; charset=UTF-8'
|
|||||||
* @returns The updated Headers object.
|
* @returns The updated Headers object.
|
||||||
*/
|
*/
|
||||||
const setHeaders = (headers: Headers, map: Record<string, string> = {}) => {
|
const setHeaders = (headers: Headers, map: Record<string, string> = {}) => {
|
||||||
for (let i = 0, keys = Object.keys(map), len = keys.length; i < len; i++) {
|
for (const key of Object.keys(map)) {
|
||||||
const key = keys[i]
|
|
||||||
headers.set(key, map[key])
|
headers.set(key, map[key])
|
||||||
}
|
}
|
||||||
return headers
|
return headers
|
||||||
|
Loading…
Reference in New Issue
Block a user