@mitchell-collins/superclass
v1.0.1
Published
Used to define a super class, adds a super attribute which holds the name of the super class.
Downloads
129
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/superclass
Example:
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"