MCPcopy Create free account
hub / github.com/visgl/react-map-gl / getMethodNames

Function getMethodNames

modules/react-mapbox/src/mapbox/create-ref.ts:91–109  ·  view source on GitHub ↗
(obj: Object)

Source from the content-addressed store, hash-verified

89}
90
91function getMethodNames(obj: Object) {
92 const result = new Set<string>();
93
94 let proto = obj;
95 while (proto) {
96 for (const key of Object.getOwnPropertyNames(proto)) {
97 if (
98 key[0] !== '_' &&
99 typeof obj[key] === 'function' &&
100 key !== 'fire' &&
101 key !== 'setEventedParent'
102 ) {
103 result.add(key);
104 }
105 }
106 proto = Object.getPrototypeOf(proto);
107 }
108 return Array.from(result);
109}

Callers 1

createRefFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…