Skip to content

Commit c2c8e68

Browse files
committed
use existing JSONScript interpreter instance, bump version
1 parent bea75e1 commit c2c8e68

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

Diff for: index.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ module.exports = jsonscriptExpress;
88

99

1010
var 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;

Diff for: package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
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": {
@@ -26,7 +26,7 @@
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
},

0 commit comments

Comments
 (0)