From 1fed4a7495aba47aee04d24f8cdba34d5ee00f17 Mon Sep 17 00:00:00 2001 From: shysolocup <88659700+shysolocup@users.noreply.github.com> Date: Mon, 30 Sep 2024 11:38:22 -0500 Subject: [PATCH] added the pre methods to wiki I'm gonna add the classes later --- wiki/addPreAChore().md | 7 +++++++ wiki/addPreChore().md | 24 +++++++++++++++++++++++ wiki/addPreClass().md | 43 ++++++++++++++++++++++++++++++++++++++++++ wiki/addPreFunc().md | 29 ++++++++++++++++++++++++++++ wiki/addPreProp().md | 29 ++++++++++++++++++++++++++++ 5 files changed, 132 insertions(+) create mode 100644 wiki/addPreAChore().md create mode 100644 wiki/addPreChore().md create mode 100644 wiki/addPreClass().md create mode 100644 wiki/addPreFunc().md create mode 100644 wiki/addPreProp().md diff --git a/wiki/addPreAChore().md b/wiki/addPreAChore().md new file mode 100644 index 0000000..94bc66b --- /dev/null +++ b/wiki/addPreAChore().md @@ -0,0 +1,7 @@ +addPreAChore() adds a new async pre chore so you can use it before you create a new instance
+too lazy to do an example for it + +
+ +> ## Class.addPreAChore() +> description: adds a new pre async chore so you can use it before you create a new instance
\ No newline at end of file diff --git a/wiki/addPreChore().md b/wiki/addPreChore().md new file mode 100644 index 0000000..3cbaa26 --- /dev/null +++ b/wiki/addPreChore().md @@ -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] +``` + +
+ +> ## Class.addPreChore() +> description: adds a new pre chore making it so you can use without creating an instance
+> calls: +> - addPreChore() +> - setPreChore() +> - newPreChore() \ No newline at end of file diff --git a/wiki/addPreClass().md b/wiki/addPreClass().md new file mode 100644 index 0000000..cdfc7db --- /dev/null +++ b/wiki/addPreClass().md @@ -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 +``` + +
+ +> ## 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
+> calls: +> - addPreClass() +> - addPreSubClass()/addPreSubclass() +> - addPreSub() +> - setPreClass() +> - setPreSubClass()/setPreSubclass() +> - setPreSub() +> - newPreClass() +> - newPreSubClass()/newPreSubclass() +> - newPreSub() +> - addPC() +> - addPSC() +> - addPS() +> - setPC() +> - setPSC() +> - setPS() +> - newPC() +> - newPSC() +> - newPS() \ No newline at end of file diff --git a/wiki/addPreFunc().md b/wiki/addPreFunc().md new file mode 100644 index 0000000..40332de --- /dev/null +++ b/wiki/addPreFunc().md @@ -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] +``` + +
+ +> ## Class.addPreFunc() +> description: adds a new pre function making it so you can use without creating an instance
+> calls: +> - addPreFunc() +> - addPreFunction() +> - setPreFunc() +> - setPreFunction() +> - newPreFunc() +> - newPreFunction() \ No newline at end of file diff --git a/wiki/addPreProp().md b/wiki/addPreProp().md new file mode 100644 index 0000000..4af86c6 --- /dev/null +++ b/wiki/addPreProp().md @@ -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] +``` + +
+ +> ## Class.addPreProp() +> description: adds a new pre property making it so you can use without creating an instance
+> calls: +> - addPreProp() +> - addPreProperty() +> - setPreProp() +> - setPreProperty() +> - newPreProp() +> - newPreProperty() \ No newline at end of file