shared
utils
string
object
is
extension
js
tracking
string
dom
when
selection
position
iframe
event
scroll
console
node
string
project
fs
console
getExtendsStack
Type:Function
Status:beta
Since:1.0.0
Platform:jsnode
@blackbyte.sugar.shared.class
This function take a class as parameter and return an array of all the class names used to extends this one…
Params
- cls*-Class
The class to get the stack of
- settings{}TGetExtendsStackSettings
Some settings to configure your process
Return
- -Object
An object of all the parent classes
Example
import { getExtendsStack } from '@blackbyte/sugar/class';
class Coco extends Error {}
class Plop extends Coco {}
getExtendsStack(Plop); // => {Coco: [class ...], Error: [class ...]};Settings
- includeBaseClassfalseBoolean
Specify if you want to include the base class in the stack or not
Todo
- testsnormal
Author
- Olivier Bosselolivier.bossel@gmail.comhttps://blackbyte.space