回答編集履歴
1
コードの修正
answer
CHANGED
@@ -15,7 +15,6 @@
|
|
15
15
|
const getMethodNameOf = obj => {
|
16
16
|
const proto = Object.getPrototypeOf(obj);
|
17
17
|
if ( proto === null ) return [ ...Object.getOwnPropertyNames(obj).filter( p => obj[p] instanceof Function) ];
|
18
|
-
console.log ( obj, proto );
|
19
18
|
return [ ...Object.getOwnPropertyNames(obj).filter( p => obj[p] instanceof Function ), ...getMethodNameOf(proto)];
|
20
19
|
}
|
21
20
|
|