lib/index.js
function accountOrIdStep(obj, name) {
    return function (accountOrId) {
        if (typeof accountOrId === 'string') {
            // W3C obfuscated id
            return idStep(obj, name)(accountOrId);
        } else {
            // accountOrId expected to be {type: 'github', id: 123456}
            var ctx = new obj();
            ctx.steps.push(name);
            ctx.steps.push("connected");
            ctx.steps.push(accountOrId.type);
            ctx.steps.push(accountOrId.id);
            return ctx;
        }
    };
}
function accountOrIdStep(obj, name) {
    return function (accountOrId) {
        if (typeof accountOrId === 'string') {
            // W3C obfuscated id
            return idStep(obj, name)(accountOrId);
        } else {
            // accountOrId expected to be {type: 'github', id: 123456}
            var ctx = new obj();
            ctx.steps.push(name);
            ctx.steps.push("connected");
            ctx.steps.push(accountOrId.type);
            ctx.steps.push(accountOrId.id);
            return ctx;
        }
    };
}
function accountOrIdStep ( obj , name ) { return function ( accountOrId ) { if ( typeof accountOrId === 'string' ) { // W3C obfuscated id return idStep ( obj , name ) ( accountOrId ) ; } else { // accountOrId expected to be {type: 'github', id: 123456} var ctx = new obj ( ) ; ctx . steps . push ( name ) ; ctx . steps . push ( "connected" ) ; ctx . steps . push ( accountOrId . type ) ; ctx . steps . push ( accountOrId . id ) ; return ctx ; } } ; }
generates a step that takes either an account object or an ID
generates a step that takes either an account object or an ID