MCPcopy
hub / github.com/nodejs/undici / has

Method has

lib/web/cache/cachestorage.js:60–71  ·  view source on GitHub ↗

* @see https://w3c.github.io/ServiceWorker/#cache-storage-has * @param {string} cacheName * @returns {Promise }

(cacheName)

Source from the content-addressed store, hash-verified

58 * @returns {Promise<boolean>}
59 */
60 async has (cacheName) {
61 webidl.brandCheck(this, CacheStorage)
62
63 const prefix = 'CacheStorage.has'
64 webidl.argumentLengthCheck(arguments, 1, prefix)
65
66 cacheName = webidl.converters.DOMString(cacheName, prefix, 'cacheName')
67
68 // 2.1.1
69 // 2.2
70 return this.#caches.has(cacheName)
71 }
72
73 /**
74 * @see https://w3c.github.io/ServiceWorker/#dom-cachestorage-open

Callers

nothing calls this directly

Calls 4

brandCheckMethod · 0.80
argumentLengthCheckMethod · 0.80
DOMStringMethod · 0.80
hasMethod · 0.65

Tested by

no test coverage detected