Skip to content

addPreFunc()

github-actions[bot] edited this page Sep 30, 2024 · 1 revision

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()
Clone this wiki locally