Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

queueobj

Package Overview
Dependencies
Maintainers
1
Versions
103
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

queueobj - npm Package Compare versions

Comparing version 4.2.2 to 4.3.0

24

lib/appenders/all.js

@@ -5,3 +5,3 @@ "use strict";

* @author Jim Manton: jrman@risebroadband.net
* @since 2021-03-22
* @since 2021-03-22l
*/

@@ -16,24 +16,6 @@

var t = this
t.aname = 'all.js'
t.aname = 'all'
t.process = t.process.bind(this)
return t
}
process() {
let t = this, obj
if (t.getParent().resolve == null && t.getParent().reject == null) {
return new Promise((resolve, reject) => {
t.getParent().resolve = resolve
t.getParent().reject = reject
t.process()
});
}
obj = t.getParent().getObjectToProcess()
if (typeof obj == 'undefined') {
return t.getParent().resolve('done')
}
obj.process(()=>{
t.process()
})
}
}

63

lib/appenders/base.js

@@ -21,3 +21,66 @@ "use strict";

}
process(props = null) {
try {
let t = this, obj, func
if (t.getParent().resolve == null && t.getParent().reject == null) {
return new Promise((resolve, reject) => {
t.getParent().resolve = resolve
t.getParent().reject = reject
t.process()
});
}
switch (t.aname) {
case 'all':
obj = t.getParent().getObjectToProcess()
if (typeof obj == 'undefined') {
return t.getParent().resolve('done')
}
obj.process(() => {
t.process()
})
break
case 'top_one':
obj = t.getParent().getObjectToProcess()
if (typeof obj == 'undefined') {
return t.getParent().reject('nothing to process')
}
obj.process(() => {
t.getParent().resolve('done')
t.getParent().resolve = null
t.getParent().reject = null
})
break
case 'bottom_one':
obj = t.getParent().getBottomObjectToProcess()
if (typeof obj == 'undefined') {
return t.getParent().reject('nothing to process')
}
obj.process(() => {
t.getParent().resolve('done')
t.getParent().resolve = null
t.getParent().reject = null
})
break
case 'func_all':
func = t.getParent().getObjectToProcess()
if (typeof func == 'undefined') {
return t.getParent().resolve('done')
}
func(() => {
t.process()
})
break
}
} catch (e) {
e.message = "queueObj base.js process error: " + e.message
throw (e)
}
}
}

@@ -15,26 +15,5 @@ "use strict";

var t = this
t.aname = 'all.js'
t.aname = 'bottom_one'
return t
}
process() {
let t = this, obj
if (t.getParent().resolve == null && t.getParent().reject == null) {
return new Promise((resolve, reject) => {
t.getParent().resolve = resolve
t.getParent().reject = reject
t.process()
});
}
obj = t.getParent().getBottomObjectToProcess()
if (typeof obj == 'undefined') {
return t.getParent().reject('nothing to process')
}
obj.process(()=>{
t.getParent().resolve('done')
t.getParent().resolve = null
t.getParent().reject = null
})
}
}

@@ -11,34 +11,9 @@ "use strict";

exports = module.exports = class eval_all extends base {
exports = module.exports = class func_all extends base {
constructor(props) {
super(props)
var t = this
t.aname = 'all.js'
t.aname = 'func_all'
return t
}
process() {
let t = this, func
try {
if (t.getParent().resolve == null && t.getParent().reject == null) {
return new Promise((resolve, reject) => {
t.getParent().resolve = resolve
t.getParent().reject = reject
t.process()
});
}
func = t.getParent().getObjectToProcess()
if (typeof func == 'undefined') {
return t.getParent().resolve('done')
}
func(() => {
t.process()
})
} catch (e) {
e.message = "eval_all process error: " + e.message
console.log(e.message)
throw (e)
}
}
}

@@ -15,26 +15,5 @@ "use strict";

var t = this
t.aname = 'all.js'
t.aname = 'top_one'
return t
}
process() {
let t = this, obj
if (t.getParent().resolve == null && t.getParent().reject == null) {
return new Promise((resolve, reject) => {
t.getParent().resolve = resolve
t.getParent().reject = reject
t.process()
});
}
obj = t.getParent().getObjectToProcess()
if (typeof obj == 'undefined') {
return t.getParent().reject('nothing to process')
}
obj.process(()=>{
t.getParent().resolve('done')
t.getParent().resolve = null
t.getParent().reject = null
})
}
}

@@ -5,3 +5,3 @@ {

},
"version": "4.2.2",
"version": "4.3.0",
"bundleDependencies": false,

@@ -8,0 +8,0 @@ "dependencies": {

@@ -7,6 +7,6 @@ # QueueObj

* all - process all added objects.
* func_all - process functions to all added objects.
* func_all - process custom functions to added objects.
* top_one - process only the object in the 0(zero) position of the process array.
* bottom_one - process only the object in the last position of the process array.
* array - process object in various ways: all, items, or byIds.
* array - process object in various ways: all, by items, or by Ids.

@@ -35,4 +35,1 @@ Installation

```
Usage
---------

@@ -9,3 +9,3 @@ const assert = require('assert'),

},
"version": "4.2.2",
"version": "4.3.0",
"bundleDependencies": false,

@@ -12,0 +12,0 @@ "dependencies": {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc