Home / Function/ inspectable_array() — svelte Function Reference

inspectable_array() — svelte Function Reference

Architecture documentation for the inspectable_array() function in proxy.js from the svelte codebase.

Entity Profile

Dependency Diagram

graph TD
  7a03d99a_97a2_84ec_f817_160480e2c5b8["inspectable_array()"]
  71020d3b_ab64_9fea_2a06_dab93412f92f["proxy.js"]
  7a03d99a_97a2_84ec_f817_160480e2c5b8 -->|defined in| 71020d3b_ab64_9fea_2a06_dab93412f92f
  c55b2607_d45b_c327_8826_7bdf245d80f6["proxy()"]
  c55b2607_d45b_c327_8826_7bdf245d80f6 -->|calls| 7a03d99a_97a2_84ec_f817_160480e2c5b8
  a08b6cc5_af73_1be4_d02f_3113cf8a8305["get()"]
  7a03d99a_97a2_84ec_f817_160480e2c5b8 -->|calls| a08b6cc5_af73_1be4_d02f_3113cf8a8305
  f8ec5faa_6e11_6b8d_4711_9895319825a3["set_eager_effects_deferred()"]
  7a03d99a_97a2_84ec_f817_160480e2c5b8 -->|calls| f8ec5faa_6e11_6b8d_4711_9895319825a3
  8cbd2617_a90a_da93_cf30_82f21876749c["flush_eager_effects()"]
  7a03d99a_97a2_84ec_f817_160480e2c5b8 -->|calls| 8cbd2617_a90a_da93_cf30_82f21876749c
  style 7a03d99a_97a2_84ec_f817_160480e2c5b8 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/svelte/src/internal/client/proxy.js lines 412–432

function inspectable_array(array) {
	return new Proxy(array, {
		get(target, prop, receiver) {
			var value = Reflect.get(target, prop, receiver);
			if (!ARRAY_MUTATING_METHODS.has(/** @type {string} */ (prop))) {
				return value;
			}

			/**
			 * @this {any[]}
			 * @param {any[]} args
			 */
			return function (...args) {
				set_eager_effects_deferred();
				var result = value.apply(this, args);
				flush_eager_effects();
				return result;
			};
		}
	});
}

Domain

Subdomains

Called By

Frequently Asked Questions

What does inspectable_array() do?
inspectable_array() is a function in the svelte codebase, defined in packages/svelte/src/internal/client/proxy.js.
Where is inspectable_array() defined?
inspectable_array() is defined in packages/svelte/src/internal/client/proxy.js at line 412.
What does inspectable_array() call?
inspectable_array() calls 3 function(s): flush_eager_effects, get, set_eager_effects_deferred.
What calls inspectable_array()?
inspectable_array() is called by 1 function(s): proxy.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free