MCPcopy Create free account
hub / github.com/Effect-TS/effect / fromIterable

Function fromIterable

packages/effect/src/unstable/http/Cookies.ts:253–259  ·  view source on GitHub ↗
(cookies: Iterable<Cookie>)

Source from the content-addressed store, hash-verified

251 * @since 4.0.0
252 */
253export const fromIterable = (cookies: Iterable<Cookie>): Cookies => {
254 const record: Record<string, Cookie> = {}
255 for (const cookie of cookies) {
256 InternalRecord.assignProperty(record, cookie.name, cookie)
257 }
258 return fromReadonlyRecord(record)
259}
260
261/**
262 * Create a Cookies object from a set of Set-Cookie headers

Callers 2

fromSetCookieFunction · 0.70
Cookies.tsFile · 0.70

Calls 1

fromReadonlyRecordFunction · 0.85

Tested by

no test coverage detected