Cleanest/recommended way to extend base routines from plugin

Hey there,  I'm looking at doing some work to add a job system into RPGmaker.  I've gone through the core code, identifying places where I'll need to add new bits, but for the most part, I would like to *add* to what is already there, rather than replacing it.  The given plugins so far as I saw only replaced existing routines, none of them preserved the existing routines.

I presume I can save aside the existing definition of the function in a different variable name and then call that function from the new one, but is there a cleaner approach to doing this?   The documentation didn't seem to go into this topic.
My ActorStepAnim and BattleMode and MoreEscapeCodes and SmartPath plugins all alias, and call, existing methods.

I've moved this thread to Learning Javascript. Please be sure to post your threads in the correct forum next time. Thank you.
Shaz - OK, so you think this post belongs in "Learning Javascript" rather than "Javascript/Plugin Support".  My question was specifically asking about a best practice within the RMMV pluging framework.  I even noted a general javascript solution in my post and asked if there was a "best practice" type solution expected in the plugin framework- so, I'm not sure why you think this belongs in a different subforum.

Taking my first thread and moving it's forum and giving me a warning to "be sure to post in the right forum" feels VERY unwelcoming.  I don't even think in looking  at the two forums that I agree it belongs in the new forum.
Shaz - OK, so you think this post belongs in "Learning Javascript" rather than "Javascript/Plugin Support".  My question was specifically asking about a best practice within the RMMV pluging framework.  I even noted a general javascript solution in my post and asked if there was a "best practice" type solution expected in the plugin framework- so, I'm not sure why you think this belongs in a different subforum.

Taking my first thread and moving it's forum and giving me a warning to "be sure to post in the right forum" feels VERY unwelcoming.  I don't even think in looking  at the two forums that I agree it belongs in the new forum.
Ah live with it, the mods follow a protocol, iirc, so no point in arguing.

Anyway, if you'd like to 'add' rather than 'replace' an existing method, it is best to alias it. It calls whatever it is supposed to call and then calls the ones you added, be sure to look into that.

Original thread: https://forums.rpgmakerweb.com/threads/cleanest-recommended-way-to-extend-base-routines-from-plugin.47281/