Fonksiyonları kullanabilirsin.

a.js

let data = {a = true}
foo(data);
b.js
function foo(data) {
// data parametresine atandı.
}