getMethods

Type:Function
Status:beta
Since:1.0.0
Platform:jsnode
@blackbyte.sugar.shared.class

This function take an instance as parameter and return all the methods in array format

Params

  1. instance*-Object

    The instance of the object to get the methods names of

Return

  1. -Array

    A simple array of all the methods names

Example

import { getMethods } from '@blackbyte/sugar/class';
myClass {
 constructor() {}
 hello() {}
 world() {}
}
const myInstance = new myClass();
getMethods(myInstance); // => ['hello','world']

Todo

  • testsnormal