Subj : Using sbbsdefs and userdefs
To   : Digital Man
From : Nightfox
Date : Wed Aug 16 2023 02:11 pm

 Re: Using sbbsdefs and userdefs
 By: Digital Man to Nelgin on Wed Aug 16 2023 12:59 pm

DM> The second argument to require() is just one variable name that you expect
DM> to be defined in the required script, not all of the variable names that
DM> you expect to be defined. The entire script that you require() is
DM> evaluated if the specified named variable is not defined.

So for require(), if you want to be able to use everything from the required file, would you omit the 2nd argument (or pass an empty string)?  In my .js scripts, I have passed a variable name as the 2nd argument for require(), and I have been able to use other variables from that .js as well.

Nightfox

---
� Synchronet � Digital Distortion: digitaldistortionbbs.com