mirror of
https://github.com/wassname/talk.git
synced 2026-06-28 23:26:48 +08:00
20 lines
408 B
JavaScript
20 lines
408 B
JavaScript
const _ = require('lodash');
|
|
|
|
const Comment = require('./comment');
|
|
const Action = require('./action');
|
|
const User = require('./user');
|
|
|
|
module.exports = (context) => {
|
|
|
|
// We need to return an object to be accessed.
|
|
return _.merge(...[
|
|
Comment,
|
|
Action,
|
|
User,
|
|
].map((mutators) => {
|
|
|
|
// Each set of mutators is a function which takes the context.
|
|
return mutators(context);
|
|
}));
|
|
};
|