@mitchell-collins/superclass
v1.1.3
Published
Used to define a super class, adds a super attribute which holds the name of the super class.
Readme
SuperClass
A npm package used to construct a super class, defining a private attribute super which holds the name of the super class. It also defines getter and setter methods for this attribute.
Install Package:
npm i @mitchell-collins/superclassExample:
class Person extends SuperClass {
constructor(personName) {
super("Person"); // defines the name of super class
this.name = personName;
}
}
const dave = new Person("Dave");
console.log(dave.getSuper()); //output: "Person"