mirror of
https://github.com/ueberdosis/tiptap.git
synced 2024-12-24 01:17:50 +08:00
10 lines
241 B
TypeScript
10 lines
241 B
TypeScript
|
export default function getAllMethodNames(obj: Object) {
|
||
|
let methods = new Set()
|
||
|
|
||
|
while (obj = Reflect.getPrototypeOf(obj)) {
|
||
|
let keys = Reflect.ownKeys(obj)
|
||
|
keys.forEach((k) => methods.add(k))
|
||
|
}
|
||
|
|
||
|
return Array.from(methods)
|
||
|
}
|