addPreFunc() - shysolocup/aepl GitHub Wiki
addPreFunc() and addPreFunction() adds a new pre function making it so you can use without creating an instance
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()