-
Notifications
You must be signed in to change notification settings - Fork 0
new()
paige edited this page Sep 20, 2023
·
3 revisions
new() and addNew() can be used to add different things more easily
const Class = require('aepl');
const { Soup } = require('stews');
new Class("Main", class {
this.data = new Soup([1, 2, 3]);
});
Main.new("prop", "reversed", function() {
return this.data.reverse();
});
Main.addNew("func", "shuffle", function() {
return this.data.shuffle();
});
let main = new Main();
console.log(main.reversed); // [3, 2, 1]
description: adds a new thing
calls:
- new()
- addNew()
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