require('../models/owners.js')(sequelize, Sequelize);
I don't understand the syntax of having require(..something)(why?)
next to each other?
require('../models/owners.js')(sequelize, Sequelize);
I don't understand the syntax of having require(..something)(why?)
next to each other?
require('../models/owners.js')(sequelize, Sequelize);
The above is (pretty much) equivalent to
const owners = require('../models/owners.js');
owners(sequelize, Sequelize);
However the second example results in a constant called owners
as well.