Comparing version 2.0.0 to 3.0.0
18
app.ts
@@ -9,4 +9,5 @@ | ||
const cc = require("node-console-colors") | ||
var all = require('./lib/appenders/all') | ||
var top_one = require('./lib/appenders/top_one') | ||
var all = require('./lib/appenders/all'), | ||
top_one = require('./lib/appenders/top_one'), | ||
bottom_one = require('./lib/appenders/bottom_one') | ||
@@ -21,2 +22,3 @@ exports = module.exports = class QueueJson { | ||
private top_one: any; | ||
private bottom_one: any; | ||
private appenders_dir = './lib/appenders/' | ||
@@ -75,5 +77,9 @@ private debug: boolean = false; | ||
break | ||
case 'bottom_one': | ||
if (i == (props.input_data.length - 1)) | ||
add = true | ||
break | ||
default: | ||
add = true | ||
} | ||
} | ||
if (add) | ||
@@ -100,2 +106,5 @@ t.class_obj_array.push(new t.props.class_obj(dat.props)) | ||
break | ||
case 'bottom_one': | ||
t.bottom_one = new bottom_one(t.props) | ||
break | ||
default: | ||
@@ -154,2 +163,5 @@ throw new Error(`appender(${t.props.appender}) is not defined`) | ||
return t.top_one.process() | ||
case 'bottom_one': | ||
pro.dat_array.push('bottom_one') | ||
return t.bottom_one.process() | ||
default: | ||
@@ -156,0 +168,0 @@ throw new Error(`nothing to process`) |
{ | ||
"name": "queuejson", | ||
"version": "2.0.0", | ||
"version": "3.0.0", | ||
"description": "Process class objects according to json array input data.", | ||
@@ -19,2 +19,3 @@ "main": "app.ts", | ||
"test_top_one": "npx ts-node ./tests/top_one.ts", | ||
"test_bottom_one": "npx ts-node ./tests/bottom_one.ts", | ||
"test": "mocha" | ||
@@ -21,0 +22,0 @@ }, |
@@ -9,2 +9,3 @@ # QueueJson | ||
* top_one - asynchronous - process class object per the first entry in a json input array. | ||
* bottom_one - asynchronous - process class object per the last entry in a json input array. | ||
@@ -28,2 +29,3 @@ Installation | ||
npm run test_top_one | ||
npm run test_bottom_one | ||
@@ -30,0 +32,0 @@ ``` |
@@ -7,3 +7,3 @@ const assert = require('assert'), | ||
"name": "queuejson", | ||
"version": "2.0.0", | ||
"version": "3.0.0", | ||
"description": "Process class objects according to json array input data.", | ||
@@ -24,2 +24,3 @@ "main": "app.ts", | ||
"test_top_one": "npx ts-node ./tests/top_one.ts", | ||
"test_bottom_one": "npx ts-node ./tests/bottom_one.ts", | ||
"test": "mocha" | ||
@@ -26,0 +27,0 @@ }, |
@@ -5,3 +5,3 @@ | ||
* @since 2022-05-24 | ||
* top_one.ts | ||
* bottom_one.ts | ||
*/ | ||
@@ -8,0 +8,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
19518
13
497
89
1