JS Import Export ES5

// code.js
module.exports = { something: 'value' };

// main.js
const code = require('./code');
// or
const { something } = require('./code')
DanielMor