This repository was archived by the owner on Aug 17, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
setName()
paige edited this page Sep 28, 2023
·
2 revisions
the setName function is used to create an alternate name for a class
const Class = require('aepl');
// creates a new class named A
Class.new("A", class {
constructor() {
this.data = [1, 2, 3];
}
});
// creates a new prop called test
A.newProp("test", function() {
return this.data.reverse();
});
// sets name to B
A.setName("B");
let b = new B();
console.log(b); // A { data: [1, 2, 3] }
console.log(b.test); // [3, 2, 1]description: sets the name of a class
parameters:
- name
String: name to set to- ?autodefine
Boolean: if it should automatically define as the new namerefs:
- setName()
- setN()
If you want to check out the different versions and changes check out the releases
For a look into the development side check out the src folder
init()
from()
inspect()
new()
addClass()
addFunc()
addProp()
addChore()
addAsyncChore()
addPreClass()
addPreFunc()
addPreProp()
addPreChore()
addPreAChore()
setName()
setInspect()
Subclass
Function
Property
Chore
AsyncChore
Preclass
PreFunction
PreProperty
PreChore
PreAsyncChore
compact
multiple-layers
event handler
alternate names
setting and getting inspects