SpyStorage Class — astro Architecture
Architecture documentation for the SpyStorage class in utils.js from the astro codebase.
Entity Profile
Dependency Diagram
graph TD e73af045_531a_d210_5f55_4989b42dfb4d["SpyStorage"] cf581885_d0e2_b165_a30e_db299dd301a8["utils.js"] e73af045_531a_d210_5f55_4989b42dfb4d -->|defined in| cf581885_d0e2_b165_a30e_db299dd301a8 8366d568_85ed_5bfc_8662_f1b3d3576efb["store()"] e73af045_531a_d210_5f55_4989b42dfb4d -->|method| 8366d568_85ed_5bfc_8662_f1b3d3576efb e661d592_41c3_3de9_d709_60792bc95b6d["getItem()"] e73af045_531a_d210_5f55_4989b42dfb4d -->|method| e661d592_41c3_3de9_d709_60792bc95b6d d98ad8a1_ebcf_cee5_86f6_c3806901fe88["getItemRaw()"] e73af045_531a_d210_5f55_4989b42dfb4d -->|method| d98ad8a1_ebcf_cee5_86f6_c3806901fe88 21dc5e8d_46f3_821f_4eb3_f012cac908f3["setItemRaw()"] e73af045_531a_d210_5f55_4989b42dfb4d -->|method| 21dc5e8d_46f3_821f_4eb3_f012cac908f3 57a752a5_820f_1835_d366_c3ae78c50088["setItem()"] e73af045_531a_d210_5f55_4989b42dfb4d -->|method| 57a752a5_820f_1835_d366_c3ae78c50088
Relationship Graph
Source Code
packages/astro/test/units/assets/fonts/utils.js lines 8–49
export class SpyStorage {
/** @type {Map<string, any>} */
#store = new Map();
get store() {
return this.#store;
}
/**
* @param {string} key
* @returns {Promise<any | null>}
*/
async getItem(key) {
return this.#store.get(key) ?? null;
}
/**
* @param {string} key
* @returns {Promise<any | null>}
*/
async getItemRaw(key) {
return this.#store.get(key) ?? null;
}
/**
* @param {string} key
* @param {any} value
* @returns {Promise<void>}
*/
async setItemRaw(key, value) {
this.#store.set(key, value);
}
/**
* @param {string} key
* @param {any} value
* @returns {Promise<void>}
*/
async setItem(key, value) {
this.#store.set(key, value);
}
}
Domain
Source
Frequently Asked Questions
What is the SpyStorage class?
SpyStorage is a class in the astro codebase, defined in packages/astro/test/units/assets/fonts/utils.js.
Where is SpyStorage defined?
SpyStorage is defined in packages/astro/test/units/assets/fonts/utils.js at line 8.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free