I have a script foo.js that contains some functions I want to play with in the REPL.
foo.js
Is there a way to have node execute my script and then jump into a
Another way is to define those functions as global.
global.helloWorld = function() { console.log("Hello World"); }
Then preload the file in the REPL as:
node -r ./file.js
Then the function helloWorld can be accessed directly in the REPL.
helloWorld