-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added the pre methods to wiki I'm gonna add the classes later
- Loading branch information
1 parent
3223342
commit 1fed4a7
Showing
5 changed files
with
132 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
addPreAChore() adds a new async pre chore so you can use it before you create a new instance<br> | ||
too lazy to do an example for it | ||
|
||
<br> | ||
|
||
> ## Class.addPreAChore() | ||
> description: adds a new pre async chore so you can use it before you create a new instance<br> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
addPreChore() adds a new pre chore making it so you can use without creating an instance | ||
```js | ||
const Class = require('aepl'); | ||
|
||
let data = [1, 2, 3]; | ||
|
||
|
||
new Class("Main", class {}); | ||
|
||
|
||
Main.addPreChore("reverse", `return data.reverse();`); | ||
|
||
|
||
console.log(Main.reverse()); // [3, 2, 1] | ||
``` | ||
|
||
<br> | ||
|
||
> ## Class.addPreChore() | ||
> description: adds a new pre chore making it so you can use without creating an instance<br> | ||
> calls: | ||
> - addPreChore() | ||
> - setPreChore() | ||
> - newPreChore() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
addPreClass(), addPreClass() and addSub() adds a new subclass inside of the class itself instead of the prototype so you can use it outside of an instance | ||
```js | ||
const Class = require('aepl'); | ||
|
||
|
||
new Class("Main", class { | ||
constructor() { | ||
this.data = [1, 2, 3]; | ||
} | ||
}); | ||
|
||
|
||
Main.addPreSub("Layer0", class { /* class info */ }); | ||
Main.addPreClass("Layer1", class { /* class info */ }); | ||
Main.addPreSubClass("Layer2", class { /* class info */ }); | ||
|
||
|
||
console.log(Main.Layer0); // AeplPreClass | ||
``` | ||
|
||
<br> | ||
|
||
> ## Class.addPreClass() | ||
> description: adds a new subclass inside of the class itself instead of the prototype so you can use it outside of an instance<br> | ||
> calls: | ||
> - addPreClass() | ||
> - addPreSubClass()/addPreSubclass() | ||
> - addPreSub() | ||
> - setPreClass() | ||
> - setPreSubClass()/setPreSubclass() | ||
> - setPreSub() | ||
> - newPreClass() | ||
> - newPreSubClass()/newPreSubclass() | ||
> - newPreSub() | ||
> - addPC() | ||
> - addPSC() | ||
> - addPS() | ||
> - setPC() | ||
> - setPSC() | ||
> - setPS() | ||
> - newPC() | ||
> - newPSC() | ||
> - newPS() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
addPreFunc() and addPreFunction() adds a new pre function making it so you can use without creating an instance | ||
```js | ||
const Class = require('aepl'); | ||
|
||
let data = [1, 2, 3]; | ||
|
||
|
||
new Class("Main", class {}); | ||
|
||
|
||
Main.addPreFunc("reverse", function() { | ||
return data.reverse(); | ||
}); | ||
|
||
|
||
console.log(Main.reverse()); // [3, 2, 1] | ||
``` | ||
|
||
<br> | ||
|
||
> ## Class.addPreFunc() | ||
> description: adds a new pre function making it so you can use without creating an instance<br> | ||
> calls: | ||
> - addPreFunc() | ||
> - addPreFunction() | ||
> - setPreFunc() | ||
> - setPreFunction() | ||
> - newPreFunc() | ||
> - newPreFunction() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
addPreProp() and addPreProperty() adds a new pre property making it so you can use without creating an instance | ||
```js | ||
const Class = require('aepl'); | ||
|
||
let data = [1, 2, 3]; | ||
|
||
|
||
new Class("Main", class {}); | ||
|
||
|
||
Main.addPreProp("reversed", function() { | ||
return data.reverse(); | ||
}); | ||
|
||
|
||
console.log(Main.reversed); // [3, 2, 1] | ||
``` | ||
|
||
<br> | ||
|
||
> ## Class.addPreProp() | ||
> description: adds a new pre property making it so you can use without creating an instance<br> | ||
> calls: | ||
> - addPreProp() | ||
> - addPreProperty() | ||
> - setPreProp() | ||
> - setPreProperty() | ||
> - newPreProp() | ||
> - newPreProperty() |