MCPcopy
hub / github.com/sveltejs/svelte / Attribute

Function Attribute

packages/svelte/src/compiler/legacy.js:434–447  ·  view source on GitHub ↗
(node, { visit, next, path })

Source from the content-addressed store, hash-verified

432 };
433 },
434 Attribute(node, { visit, next, path }) {
435 if (node.value !== true && !Array.isArray(node.value)) {
436 path.push(node);
437 const value = /** @type {Legacy.LegacyAttribute['value']} */ ([visit(node.value)]);
438 path.pop();
439
440 return {
441 ...node,
442 value
443 };
444 } else {
445 return next();
446 }
447 },
448 StyleDirective(node, { visit, next, path }) {
449 if (node.value !== true && !Array.isArray(node.value)) {
450 path.push(node);

Callers

nothing calls this directly

Calls 4

pushMethod · 0.80
popMethod · 0.80
visitFunction · 0.50
nextFunction · 0.50

Tested by

no test coverage detected