MCPcopy Create free account
hub / github.com/nodejs/node / add

Method add

deps/undici/src/lib/web/cache/cache.js:71–87  ·  view source on GitHub ↗
(request)

Source from the content-addressed store, hash-verified

69 }
70
71 async add (request) {
72 webidl.brandCheck(this, Cache)
73
74 const prefix = 'Cache.add'
75 webidl.argumentLengthCheck(arguments, 1, prefix)
76
77 request = webidl.converters.RequestInfo(request)
78
79 // 1.
80 const requests = [request]
81
82 // 2.
83 const responseArrayPromise = this.addAll(requests)
84
85 // 3.
86 return await responseArrayPromise
87 }
88
89 async addAll (requests) {
90 webidl.brandCheck(this, Cache)

Callers

nothing calls this directly

Calls 4

addAllMethod · 0.95
brandCheckMethod · 0.80
argumentLengthCheckMethod · 0.80
RequestInfoMethod · 0.80

Tested by

no test coverage detected