mirror of
https://github.com/honojs/hono.git
synced 2024-11-24 02:07:30 +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.
|
||||
*/
|
||||
const setHeaders = (headers: Headers, map: Record<string, string> = {}) => {
|
||||
for (let i = 0, keys = Object.keys(map), len = keys.length; i < len; i++) {
|
||||
const key = keys[i]
|
||||
for (const key of Object.keys(map)) {
|
||||
headers.set(key, map[key])
|
||||
}
|
||||
return headers
|
||||
|
Loading…
Reference in New Issue
Block a user