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

Function object

packages/svelte/src/compiler/utils/ast.js:11–21  ·  view source on GitHub ↗
(expression)

Source from the content-addressed store, hash-verified

9 * @returns {ESTree.Identifier | null}
10 */
11export function object(expression) {
12 while (expression.type === 'MemberExpression') {
13 expression = /** @type {ESTree.MemberExpression | ESTree.Identifier} */ (expression.object);
14 }
15
16 if (expression.type !== 'Identifier') {
17 return null;
18 }
19
20 return expression;
21}
22
23/**
24 * Returns true if the attribute contains a single static text node.

Callers 11

create_scopesFunction · 0.90
UpdateExpressionFunction · 0.90
build_componentFunction · 0.90
validate_bindingFunction · 0.90
validate_mutationFunction · 0.90
updateFunction · 0.90
LabeledStatementFunction · 0.90
RegularElementFunction · 0.90
AssignmentExpressionFunction · 0.90
UpdateExpressionFunction · 0.90
BindDirectiveFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected