-
-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Breaking: Use now-and-later for settle functions & export all methods…
… from index.js
- Loading branch information
Showing
13 changed files
with
70 additions
and
106 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
'use strict'; | ||
|
||
function getExtensions(lastArg){ | ||
if(typeof lastArg !== 'function'){ | ||
return lastArg; | ||
} | ||
|
||
return {}; | ||
} | ||
|
||
module.exports = getExtensions; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
'use strict'; | ||
|
||
var _ = require('lodash'); | ||
var asyncSettle = require('async-settle'); | ||
var nowAndLater = require('now-and-later'); | ||
|
||
var onSettled = require('./onSettled'); | ||
var getExtensions = require('./getExtensions'); | ||
var verifyArguments = require('./verifyArguments'); | ||
|
||
function buildParallel(){ | ||
var args = verifyArguments(arguments); | ||
|
||
var extensions = getExtensions(_.last(args)); | ||
|
||
function settleParallel(done){ | ||
nowAndLater.parallel(args, asyncSettle, extensions, onSettled(done)); | ||
} | ||
|
||
return settleParallel; | ||
} | ||
|
||
module.exports = buildParallel; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
'use strict'; | ||
|
||
var _ = require('lodash'); | ||
var asyncSettle = require('async-settle'); | ||
var nowAndLater = require('now-and-later'); | ||
|
||
var onSettled = require('./onSettled'); | ||
var getExtensions = require('./getExtensions'); | ||
var verifyArguments = require('./verifyArguments'); | ||
|
||
function buildSeries(){ | ||
var args = verifyArguments(arguments); | ||
|
||
var extensions = getExtensions(_.last(args)); | ||
|
||
function settleSeries(done){ | ||
nowAndLater.series(args, asyncSettle, extensions, onSettled(done)); | ||
} | ||
|
||
return settleSeries; | ||
} | ||
|
||
module.exports = buildSeries; |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters