Last active
December 20, 2020 22:39
-
-
Save somahargitai/653500ddafdaa601ded6cb5e59e44d10 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; | |
this.q = async.queue(this.processFunc, 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