-
Notifications
You must be signed in to change notification settings - Fork 0
Chore
paige edited this page Sep 15, 2023
·
4 revisions
Chores are functions made from strings.
These can be beneficial to know for some occasions
const { Class } = require('tapel');
// creates a new class named Example
new Class("Example", class {
constructor() {
this.data = [1, 2, 3];
}
});
// creates a new chore named add using a string with function data
new Example.Chore("add", "number", "this.data.push(number)");
// creates a new instance of the class
let example = new Example();
console.log(example.data); // [1, 2, 3]
example.add(4);
console.log(example.data); // [1, 2, 3, 4]
description: creates a new chore
calls:
- Chore/chore
parameters:
- name
String
: name of the chore- ...?parameters
String
: parameters for the chore- value
String
: what the chore doesnew Class("Example", class { /* class info */ }); new Example.Chore("a", "function data"); new Example.Chore("b", "arg1", "arg2" "function data"); let example = new Example(); example.a(); // runs whatever's in the function example.b(1, 2); // runs whatever's in the function
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