Import the source code for the function foo body from a file "foobody.txt".
import { readFile } from 'fs/promises';
const foo = new Function(await readFile('foobody.txt'));
void foo() { #include "foobody.txt" }
(def foo (load-file "foobody.txt"))
void _foo() { #include "foobody.txt" }
void foo() { mixin(import("foobody.txt")); }
function foo() include "foobody.txt" end function foo
import _ "embed"
//go:embed foobody.txt var s string
function foo(): void { include 'foobody.txt'; }
procedure foo; begin {$I foobody.txt} end;
sub foo { do './foobody.txt'; }
import imp
foo = imp.load_module('foobody', 'foobody.txt').foo
def foo eval File.read "foobody.txt" end
fn main() { include!("foobody.txt"); }
No security, no password. Other people might choose the same nickname.