Skip to content
  • ใช้กันแพร่หลายใน Node.js
  • ใช้ require() เพื่อนำเข้า และ module.exports หรือ exports เพื่อส่งออก
  • โหลดแบบ synchronous
js
// ส่งออก
module.exports = { function1, function2 };

// นำเข้า
const module = require('./module');

Released under the MIT License