mirror of
https://github.com/ueberdosis/tiptap.git
synced 2024-12-24 01:17:50 +08:00
11 lines
244 B
TypeScript
11 lines
244 B
TypeScript
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)
|
|
}
|