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.3.0 to 4.3.1

3

package.json

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

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

@@ -24,2 +24,3 @@ "dependencies": {

"objects",
"promises",
"mocha"

@@ -26,0 +27,0 @@ ],

@@ -34,1 +34,75 @@ # QueueObj

```
Usage
---------
```js
var colors = require('colors')
var queue = require("QueueObj");
class test1 {
process(callback) {
console.log(`processing test1`.cyan)
callback()
}
}
class test2 {
constructor(){
this.id = 200
}
process(callback) {
console.log(`processing test2`.cyan)
callback()
}
ping(){
console.log('hello from test2'.rainbow)
}
}
class test3 {
process(callback) {
console.log(`processing test3`.cyan)
callback()
}
}
let qObj = new queue(), props = { appender: 'array' }
qObj.load(props).add(new test1()).add(new test2()).add(new test3())
qObj.process({ items: [0, 1] }).then(res => {
console.log(`done with items[0,1]`.green)
qObj.process({ items: [1, 2] }).then(res => {
console.log(`done with items[1,2]`.green)
qObj.process({ items: [2, 1, 2] }).then(res => {
console.log(`done with items[2,1,2]`.green)
qObj.process({ items: [2] }).then(res => {
console.log(`done with item[2]`.green)
qObj.process({ items: [6] }).then(res => {
console.log(`done with item[6]`.green)
}, err => {
console.log(err.red)
})
})
})
})
})
qObj.getObjectById(200).ping()
qObj.process({ byIds: [100, 300] }).then(res => {
console.log(`done with byId: [100, 300]`.bold.italic.underline.yellow)
})
qObj.process().then(res => {
console.log(`done with all processing`.bold.italic.underline.green)
})
```

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

},
"version": "4.3.0",
"version": "4.3.1",
"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