StackGenVis: Alignment of Data, Algorithms, and Models for Stacking Ensemble Learning Using Performance Metrics https://doi.org/10.1109/TVCG.2020.3030352
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
StackGenVis/frontend/node_modules/async-settle/node_modules/async-done
Angelos Chatzimparmpas f521a3509d paper-version 5 years ago
..
test paper-version 5 years ago
.jshintrc paper-version 5 years ago
.npmignore paper-version 5 years ago
.travis.yml paper-version 5 years ago
LICENSE paper-version 5 years ago
README.md paper-version 5 years ago
index.js paper-version 5 years ago
package.json paper-version 5 years ago

README.md

async-done

build status

Handles completion and errors for callbacks, promises, observables and streams.

Will run call the function on nextTick. This will cause all functions to be async.

Usage

Successful completion

var asyncDone = require('async-done');

asyncDone(function(done){
  // do async things
  done(null, 2);
}, function(error, result){
  // `error` will be undefined on successful execution of the first function.
  // `result` will be the result from the first function.
});

Failed completion

var asyncDone = require('async-done');

asyncDone(function(done){
  // do async things
  done(new Error('Some Error Occurred'));
}, function(error, result){
  // `error` will be an error from the first function.
  // `result` will be undefined on failed execution of the first function.
});

API

asyncDone(fn, callback)

Takes a function to execute (fn) and a function to call on completion (callback).

fn([done])

Optionally takes a callback to call when async tasks are complete.

Completion and Error Resolution

  • Callback called
    • Completion: called with null error
    • Error: called with non-null error
  • Stream or EventEmitter returned
  • Promise returned
  • Observable returned

Warning: Sync taks are not supported and your function will never complete if the one of the above strategies is not used to signal completion. However, thrown errors will be caught by the domain.

callback(error, result)

If an error doesn't occur in the execution of the fn function, the callback method will receive the results as its second argument. Note: Observable and some streams don't received any results.

If an error occurred in the execution of the fn function, The callback method will receive an error as its first argument.

Errors can be caused by:

  • A thrown error
  • An error passed to a done callback
  • An error event emitted on a returned Stream or EventEmitter
  • A rejection of a returned Promise
  • The onError handler being called on an Observable

License

MIT