Comparing version 8.3.1 to 8.4.0
30
app.js
@@ -15,2 +15,3 @@ | ||
by_status = require('./lib/appenders/by_status'), | ||
by_name = require('./lib/appenders/by_name'), | ||
version = require('./lib/appenders/version') | ||
@@ -39,6 +40,6 @@ | ||
t.logMsg(fname, {"type": "debug"}); | ||
t.logMsg(fname, { "type": "debug" }); | ||
return t | ||
} catch (e) { | ||
t.logMsg(`${fname}: ${e}`, {"type": "error"}) | ||
t.logMsg(`${fname}: ${e}`, { "type": "error" }) | ||
} | ||
@@ -58,3 +59,3 @@ } | ||
try { | ||
t.logMsg(`${fname} appender(${t.props.appender})`, {"type": "debug"}); | ||
t.logMsg(`${fname} appender(${t.props.appender})`, { "type": "debug" }); | ||
try { | ||
@@ -85,2 +86,13 @@ try { | ||
break | ||
case 'name': | ||
case 'by_name': | ||
try { | ||
if (props.matching.indexOf(dat.props.name) > -1) | ||
add = true | ||
} catch { } | ||
try { | ||
if (props.non_matching.indexOf(dat.props.name) == -1) | ||
add = true | ||
} catch { } | ||
break | ||
case 'version': | ||
@@ -138,2 +150,6 @@ try { | ||
break | ||
case 'name': | ||
case 'by_name': | ||
t.by_name = new by_name(t.props) | ||
break | ||
case 'version': | ||
@@ -151,3 +167,3 @@ t.version = new version(t.props) | ||
} catch (e) { | ||
t.logMsg(`${fname}: ${e}`, {"type": "error"}) | ||
t.logMsg(`${fname}: ${e}`, { "type": "error" }) | ||
} | ||
@@ -212,2 +228,6 @@ } | ||
return t.by_status.process(props) | ||
case 'name': | ||
case 'by_name': | ||
pro.dat_array.push('by_name') | ||
return t.by_name.process(props) | ||
case 'version': | ||
@@ -223,5 +243,5 @@ pro.dat_array.push('version') | ||
} catch (e) { | ||
t.logMsg(`${fname}: ${e}`, {"type": "error"}) | ||
t.logMsg(`${fname}: ${e}`, { "type": "error" }) | ||
} | ||
} | ||
} |
{ | ||
"name": "queuejson", | ||
"version": "8.3.1", | ||
"version": "8.4.0", | ||
"description": "Process class objects according to json array input data.", | ||
@@ -10,3 +10,3 @@ "main": "app.js", | ||
"node-console-colors": "^1.1.4", | ||
"queueobj": "^10.4.0", | ||
"queueobj": "^11.0.1", | ||
"ts-node": "^10.9.1", | ||
@@ -22,2 +22,4 @@ "diffler": "^2.0.4" | ||
"test_sync_all": "node ./tests/sync_all.js", | ||
"test_by_name_matching": "node ./tests/by_name_matching.js", | ||
"test_by_name_non_matching": "node ./tests/by_name_non_matching.js", | ||
"test_by_status_matching": "node ./tests/by_status_matching.js", | ||
@@ -24,0 +26,0 @@ "test_by_status_non_matching": "node ./tests/by_status_non_matching.js", |
@@ -1,3 +0,1 @@ | ||
# QueueJson | ||
Process class objects by selected appender according to json array input data. All appenders are processed synchronously. | ||
@@ -13,2 +11,3 @@ | ||
* status - process custom class objects by status (matching or non-matching items) per json input array. | ||
* name - process custom class objects by name (matching or non-matching items) per json input array. | ||
* version - process custom class objects by version (matching or non-matching items) per json input array. | ||
@@ -18,6 +17,5 @@ | ||
--------- | ||
``` | ||
npm install QueueJson | ||
``` | ||
[![NPM](https://nodei.co/npm/queuejson.png?downloads=true&downloadRank=true&stars=true)](https://nodei.co/npm/queuejson/) | ||
Mocha Test | ||
@@ -37,2 +35,4 @@ --------- | ||
npm run test_sync_all | ||
npm run test_by_name_matching | ||
npm run test_by_name_non_matching | ||
npm run test_by_status_matching | ||
@@ -39,0 +39,0 @@ npm run test_by_status_non_matching |
@@ -7,3 +7,3 @@ const assert = require('assert'), | ||
"name": "queuejson", | ||
"version": "8.3.1", | ||
"version": "8.4.0", | ||
"description": "Process class objects according to json array input data.", | ||
@@ -15,3 +15,3 @@ "main": "app.js", | ||
"node-console-colors": "^1.1.4", | ||
"queueobj": "^10.4.0", | ||
"queueobj": "^11.0.1", | ||
"ts-node": "^10.9.1", | ||
@@ -27,2 +27,4 @@ "diffler": "^2.0.4" | ||
"test_sync_all": "node ./tests/sync_all.js", | ||
"test_by_name_matching": "node ./tests/by_name_matching.js", | ||
"test_by_name_non_matching": "node ./tests/by_name_non_matching.js", | ||
"test_by_status_matching": "node ./tests/by_status_matching.js", | ||
@@ -29,0 +31,0 @@ "test_by_status_non_matching": "node ./tests/by_status_non_matching.js", |
@@ -43,4 +43,2 @@ | ||
debug: true | ||
}).init({ input_data: sample_data_by_status, matching: ['new', 'print'] }) | ||
@@ -47,0 +45,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
41443
28
1075
+ Addedqueueobj@11.0.2(transitive)
- Removedqueueobj@10.5.5(transitive)
Updatedqueueobj@^11.0.1