hughsk / async-series Goto Github PK
View Code? Open in Web Editor NEWStandalone async.series() function
License: Other
Standalone async.series() function
License: Other
I am trying to pass the results of async-series to a promise for later use
class MyClass {
constructor(preFolder, postFolder, debug) {
this.result;
}
run() {
series([
function(done) {
console.log('first thing')
done()
},
function(done) {
console.log('second thing')
done(new Error('another thing'))
}
], function(err, result) {
if (err) {
return Promise.reject(err);
}
return Promise.resolve(result);
})
}
}
I hope to then use the class this way
var testClass = new MyClass();
testClass.run().then(function(){
// results from the "series" function
})
But I cant seem to get the promise to be handed over to the class instance method run(). Does anyone have an idea what I am doing wrong? thnaks
If you're not already familiar with semantic versioning check out http://semver.org/
Since this library is past initial development and has a stable public API, the version should be bumped to 1.0.0
Thanks for this module!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.