export
module.exports = {
alias: functionName,
//OR, Directly and PREFERED
functionName,
}import
const db = require("../assignment1/db")
//then use
db.functionName()💡 First of all, you have to add this property to the nearest
package.json
{
"type": "module"
}export
export function functionName() {
//body
}import
import { functionName, secondFunctionName } from "moduleName"fs.writeFileSync(FILE_PATH, JSON.stringify([], null, 2))require('crypto').randomBytes(64).toString('hex)