File tree 2 files changed +4
-4
lines changed
2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ module.exports = jsonscriptExpress;
8
8
9
9
10
10
var METHODS = [ 'get' , 'post' , 'put' , 'delete' ] ;
11
- function jsonscriptExpress ( app , options ) {
11
+ function jsonscriptExpress ( app , options , js ) {
12
12
options = _ . defaults ( options , {
13
13
routerExecutor : 'router' ,
14
14
basePath : '' ,
@@ -17,7 +17,7 @@ function jsonscriptExpress(app, options) {
17
17
} ) ;
18
18
19
19
var processResponse = processResponseFunc ( options ) ;
20
- var js = JSONScript ( options . jsonscript ) ;
20
+ js = js || new JSONScript ( options . jsonscript ) ;
21
21
addExecutorMethods ( ) ;
22
22
js . addExecutor ( options . routerExecutor , execRouter ) ;
23
23
evaluator . js = js ;
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " jsonscript-express" ,
3
- "version" : " 0.4.1 " ,
3
+ "version" : " 0.5.0 " ,
4
4
"description" : " Express middleware for batch processing using JSONScript" ,
5
5
"main" : " index.js" ,
6
6
"scripts" : {
26
26
},
27
27
"homepage" : " https://github.com/JSONScript/jsonscript-express#readme" ,
28
28
"dependencies" : {
29
- "jsonscript-js" : " ^0.4 .0" ,
29
+ "jsonscript-js" : " ^0.5 .0" ,
30
30
"lodash" : " ^4.11.1" ,
31
31
"supertest" : " ^1.2.0"
32
32
},
You can’t perform that action at this time.
0 commit comments