MCPcopy Index your code
hub / github.com/codeceptjs/CodeceptJS / pushToMethods

Function pushToMethods

lib/utils.js:87–97  ·  view source on GitHub ↗
(prop)

Source from the content-addressed store, hash-verified

85 const standard = ['constructor', 'toString', 'toLocaleString', 'valueOf', 'hasOwnProperty', 'bind', 'apply', 'call', 'isPrototypeOf', 'propertyIsEnumerable']
86
87 function pushToMethods(prop) {
88 try {
89 if (!isFunction(obj[prop]) && !isAsyncFunction(obj[prop])) return
90 } catch (err) {
91 // can't access property
92 return
93 }
94 if (standard.indexOf(prop) >= 0) return
95 if (prop.indexOf('_') === 0) return
96 methods.push(prop)
97 }
98
99 while (obj.constructor.name !== className) {
100 Object.getOwnPropertyNames(obj).forEach(pushToMethods)

Callers

nothing calls this directly

Calls 3

isFunctionFunction · 0.85
isAsyncFunctionFunction · 0.85
pushMethod · 0.80

Tested by

no test coverage detected