MCPcopy
hub / github.com/visgl/deck.gl / evaluateMember

Function evaluateMember

modules/json/src/expression-eval/expression-eval.ts:151–163  ·  view source on GitHub ↗
(node: jsep.MemberExpression, context: object)

Source from the content-addressed store, hash-verified

149}
150
151function evaluateMember(node: jsep.MemberExpression, context: object) {
152 const object = evaluate(node.object, context);
153 let key: string;
154 if (node.computed) {
155 key = evaluate(node.property, context);
156 } else {
157 key = (node.property as jsep.Identifier).name;
158 }
159 if (/^__proto__|prototype|constructor$/.test(key)) {
160 throw Error(`Access to member "${key}" disallowed.`);
161 }
162 return [object, object[key]];
163}
164
165async function evaluateMemberAsync(node: jsep.MemberExpression, context: object) {
166 const object = await evalAsync(node.object, context);

Callers 1

evaluateFunction · 0.85

Calls 1

evaluateFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…