Skip to content

daime/oahujs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Oahu JS CircleCI Code Climate Test Coverage

Oahu orchestrates tasks

Usage

'use strict';

const oahu = require('oahu');

oahu.pipeline(
    backdoor => {
        console.log('step 1');
        backdoor.next();
    },
    backdoor => {
        setTimeout(() => {
            console.log('step 2');
            backdoor.set('name', 'World');
            backdoor.next();
        }, 1000);
    },
    backdoor => {
        console.log('step 3');
        const name = backdoor.get('name');
        backdoor.done(name);
    }
)
.then(name => {
    console.log(`Hello ${name}!`);
})
.catch(err => {
    console.error(err, ':(');
});

Releases

No releases published

Packages

No packages published