fix all eslint errors

This commit is contained in:
Philipp Kühn
2020-09-24 09:49:46 +02:00
parent 0b40a0db0f
commit 5d8d353bd0
3 changed files with 11 additions and 14 deletions

View File

@@ -1,10 +1,4 @@
export default function getAllMethodNames(obj: Object) {
const methods = new Set()
while (obj = Reflect.getPrototypeOf(obj)) {
const keys = Reflect.ownKeys(obj)
keys.forEach(k => methods.add(k))
}
return Array.from(methods)
export default function getAllMethodNames(obj: Object): string[] {
return Reflect.ownKeys(Reflect.getPrototypeOf(obj))
.map(name => name.toString())
}