MCPcopy Create free account
hub / github.com/aurelia/binding / getFunction

Function getFunction

src/ast.js:734–743  ·  view source on GitHub ↗
(obj, name, mustExist)

Source from the content-addressed store, hash-verified

732}
733
734function getFunction(obj, name, mustExist) {
735 let func = obj === null || obj === undefined ? null : obj[name];
736 if (typeof func === 'function') {
737 return func;
738 }
739 if (!mustExist && (func === null || func === undefined)) {
740 return null;
741 }
742 throw new Error(`${name} is not a function`);
743}
744
745function getKeyed(obj, key) {
746 if (Array.isArray(obj)) {

Callers 3

evaluateMethod · 0.70
evaluateMethod · 0.70
connectMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected