-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.js
executable file
·43 lines (28 loc) · 1.36 KB
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
var primaryActionTypeGenerator = require('./lib/primaryActionTypeGenerator')
var primaryActionGenerator = require('./lib/primaryActionGenerator')
var primaryReducerGenerator = require('./lib/primaryReducerGenerator')
var associationActionGenerator = require('./lib/associationActionGenerator')
var associationActionTypeGenerator = require('./lib/associationActionTypeGenerator')
var associationReducerGenerator = require('./lib/associationReducerGenerator')
var initModule = function(hostConfig) {
this.hostConfig = hostConfig || {}
this.primaryActionTypesFor = function(primaryModel){
return primaryActionTypeGenerator(primaryModel)
}
this.primaryActionsFor = function(primaryModel){
return primaryActionGenerator(primaryModel, hostConfig)
}
this.primaryReducerFor = function(primaryModel){
return primaryReducerGenerator(primaryModel)
}
this.associationActionTypesFor = function(primaryModel, associatedModel){
return associationActionTypeGenerator(primaryModel, associatedModel)
}
this.associationActionsFor = function(primaryModel, associatedModel){
return associationActionGenerator(primaryModel, associatedModel, hostConfig)
}
this.associationReducerFor = function(primaryModel, associatedModel){
return associationReducerGenerator(primaryModel, associatedModel)
}
}
module.exports = initModule