File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ module.exports = jsonscriptExpress;
88
99
1010var METHODS = [ 'get' , 'post' , 'put' , 'delete' ] ;
11- function jsonscriptExpress ( app , options ) {
11+ function jsonscriptExpress ( app , options , js ) {
1212 options = _ . defaults ( options , {
1313 routerExecutor : 'router' ,
1414 basePath : '' ,
@@ -17,7 +17,7 @@ function jsonscriptExpress(app, options) {
1717 } ) ;
1818
1919 var processResponse = processResponseFunc ( options ) ;
20- var js = JSONScript ( options . jsonscript ) ;
20+ js = js || new JSONScript ( options . jsonscript ) ;
2121 addExecutorMethods ( ) ;
2222 js . addExecutor ( options . routerExecutor , execRouter ) ;
2323 evaluator . js = js ;
Original file line number Diff line number Diff line change 11{
22 "name" : " jsonscript-express" ,
3- "version" : " 0.4.1 " ,
3+ "version" : " 0.5.0 " ,
44 "description" : " Express middleware for batch processing using JSONScript" ,
55 "main" : " index.js" ,
66 "scripts" : {
2626 },
2727 "homepage" : " https://github.com/JSONScript/jsonscript-express#readme" ,
2828 "dependencies" : {
29- "jsonscript-js" : " ^0.4 .0" ,
29+ "jsonscript-js" : " ^0.5 .0" ,
3030 "lodash" : " ^4.11.1" ,
3131 "supertest" : " ^1.2.0"
3232 },
You can’t perform that action at this time.
0 commit comments