-
-
Save webprogramozo/6d10f08ef28ec56c63ee873a2ec0b2c9 to your computer and use it in GitHub Desktop.
Read this.baseURL
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const async = require('async'); | |
class demoClass { | |
constructor(con) { | |
this.constantVariable = con; | |
const that = this; | |
this.q = async.queue(function(input, cb){ | |
that.processFunc(input, cb); | |
//vagy that.processFunc.apply(that, arguments); | |
}, 1); | |
} | |
feedfunc(inputArray) { | |
for (const input of inputArray) { | |
this.q.push(input); | |
} | |
} | |
processFunc(input, cb) { | |
console.log(input); | |
console.log(this.constantVariable); | |
cb(); | |
} | |
} | |
const demo = new demoClass('inputtext'); | |
demo.feedfunc([ | |
'a', | |
'b', | |
'c' | |
]); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment