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/now-and-later
Angelos Chatzimparmpas f521a3509d paper-version 4 years ago
..
lib paper-version 4 years ago
test paper-version 4 years ago
.jshintrc paper-version 4 years ago
.npmignore paper-version 4 years ago
.travis.yml paper-version 4 years ago
LICENSE paper-version 4 years ago
README.md paper-version 4 years ago
index.js paper-version 4 years ago
package.json paper-version 4 years ago

README.md

now-and-later

Map over an array of values in parallel or series, passing each through the async iterator. Optionally, specify lifecycle extension points for before the iterator runs, after completion, or upon error.

Usage

var nal = require('now-and-later');

function iterator(value, cb){
  cb(null, value * 2)
}

function create(value, key){
  // return an object to be based to each lifecycle method
  return { key: key, value: value };
}

function before(storage){
  console.log('before iterator');
  console.log('initial value: ', storage.value);
}

function after(result, storage){
  console.log('after iterator');
  console.log('initial value: ', storage.value);
  console.log('result: ', result);
}

function error(err, storage){
  console.log('afer error in iterator');
  console.log('error: ', err);
}

/*
  Calling mapSeries with an object can't guarantee order
  It uses Object.keys to get an order
  It is better to use an array if order must be guaranteed
 */
nal.mapSeries([1, 2, 3], iterator {
  create: create,
  before: before,
  after: after,
  error: error
}, console.log);

nal.map({
  fn1: fn1,
  fn2: fn2
}, {
  create: create,
  before: before,
  after: after,
  error: error
}, console.log);