require('../models/owners.js')(sequelize, Sequelize);
我不明白将
require(..something)(why?)
放在一起的语法? 最佳答案
require('../models/owners.js')(sequelize, Sequelize);
以上是(几乎)等价于
const owners = require('../models/owners.js');
owners(sequelize, Sequelize);
然而,第二个示例也产生了一个名为
owners
的常量。关于javascript - 为什么 require ('../models/owners.js' )旁边有另一个相邻的参数?,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/59295948/