forked from caolan/async
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
119 changed files
with
66,837 additions
and
3 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,158 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
|
||
<meta charset="utf-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1"> | ||
<title>apply.js - Documentation</title> | ||
|
||
|
||
<link rel="icon" href="favicon.ico?v=2"> | ||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/bootstrap/3.3.6/css/bootstrap.min.css"> | ||
|
||
<link rel="stylesheet" href="styles/prettify-tomorrow.css"> | ||
|
||
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Montserrat:400,700"> | ||
<link rel="stylesheet" href="styles/jsdoc-default.css"> | ||
|
||
<!--[if lt IE 9]> | ||
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script> | ||
<![endif]--> | ||
<link type="text/css" rel="stylesheet" href="https://cdn.jsdelivr.net/ionicons/2.0.1/css/ionicons.min.css"> | ||
</head> | ||
<body> | ||
|
||
<div class="navbar navbar-default navbar-fixed-top"> | ||
<div class="navbar-header"> | ||
<a class="navbar-brand" href="#"> | ||
<img src="img/async-logo.svg" alt="Async.js"> | ||
</a> | ||
</div> | ||
<ul class="nav navbar-nav"> | ||
<li id="version-dropdown" class="dropdown"> | ||
<a href="#" class="dropdown-toggle vertically-centered" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">v2.1.4 <span class="caret"></span> | ||
</a> | ||
<ul class="dropdown-menu"> | ||
<li><a href="docs.html">v2.1.4</a></li> | ||
<li> | ||
<a href="https://github.com/caolan/async/blob/v1.5.2/README.md">v1.5.x</a> | ||
</li> | ||
</ul> | ||
</li> | ||
<li><a href="./index.html">Home</a></li> | ||
<li><a href="./docs.html">Docs</a></li> | ||
<li><a href="https://github.com/caolan/async"><i class="ion-social-github" aria-hidden="true"></i></a></li> | ||
</ul> | ||
<ul class="nav navbar-nav navbar-right"> | ||
<form class="navbar-form navbar-left" role="search"> | ||
<div class="form-group"> | ||
<input type="text" class="form-control typeahead" id="doc-search" placeholder="Search" autofocus> | ||
</div> | ||
</form> | ||
</ul> | ||
</div> | ||
|
||
|
||
<input type="checkbox" id="nav-trigger" class="nav-trigger"> | ||
<label for="nav-trigger" class="navicon-button x"> | ||
<div class="navicon"></div> | ||
</label> | ||
|
||
<label for="nav-trigger" class="overlay"></label> | ||
|
||
<div id="main"> | ||
<div id="main-container" data-spy="scroll" data-target="#toc" data-offset="50"> | ||
|
||
<h1 class="page-title">apply.js</h1> | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<section> | ||
<article> | ||
<pre class="prettyprint source linenums"><code>import rest from './internal/rest'; | ||
|
||
/** | ||
* Creates a continuation function with some arguments already applied. | ||
* | ||
* Useful as a shorthand when combined with other control flow functions. Any | ||
* arguments passed to the returned function are added to the arguments | ||
* originally passed to apply. | ||
* | ||
* @name apply | ||
* @static | ||
* @memberOf module:Utils | ||
* @method | ||
* @category Util | ||
* @param {Function} function - The function you want to eventually apply all | ||
* arguments to. Invokes with (arguments...). | ||
* @param {...*} arguments... - Any number of arguments to automatically apply | ||
* when the continuation is called. | ||
* @example | ||
* | ||
* // using apply | ||
* async.parallel([ | ||
* async.apply(fs.writeFile, 'testfile1', 'test1'), | ||
* async.apply(fs.writeFile, 'testfile2', 'test2') | ||
* ]); | ||
* | ||
* | ||
* // the same process without using apply | ||
* async.parallel([ | ||
* function(callback) { | ||
* fs.writeFile('testfile1', 'test1', callback); | ||
* }, | ||
* function(callback) { | ||
* fs.writeFile('testfile2', 'test2', callback); | ||
* } | ||
* ]); | ||
* | ||
* // It's possible to pass any number of additional arguments when calling the | ||
* // continuation: | ||
* | ||
* node> var fn = async.apply(sys.puts, 'one'); | ||
* node> fn('two', 'three'); | ||
* one | ||
* two | ||
* three | ||
*/ | ||
export default rest(function(fn, args) { | ||
return rest(function(callArgs) { | ||
return fn.apply(null, args.concat(callArgs)); | ||
}); | ||
}); | ||
</code></pre> | ||
</article> | ||
</section> | ||
|
||
|
||
|
||
|
||
<footer> | ||
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.3</a> on Tue Mar 28 2017 00:02:51 GMT-0400 (EDT) using the Minami theme. | ||
Documentation has been modified from the original. For more information, please see the <a href="https://github.com/caolan/async">async</a> repository.</footer></div> | ||
</div> | ||
|
||
<nav id="toc"> | ||
<h3>Methods:</h3><ul class="nav methods"><li class="toc-header"><a href="docs.html#collections">Collections</a></li><li data-type="method" class="toc-method"><a href="docs.html#concat">concat</a></li><li data-type="method" class="toc-method"><a href="docs.html#concatSeries">concatSeries</a></li><li data-type="method" class="toc-method"><a href="docs.html#detect">detect</a></li><li data-type="method" class="toc-method"><a href="docs.html#detectLimit">detectLimit</a></li><li data-type="method" class="toc-method"><a href="docs.html#detectSeries">detectSeries</a></li><li data-type="method" class="toc-method"><a href="docs.html#each">each</a></li><li data-type="method" class="toc-method"><a href="docs.html#eachLimit">eachLimit</a></li><li data-type="method" class="toc-method"><a href="docs.html#eachOf">eachOf</a></li><li data-type="method" class="toc-method"><a href="docs.html#eachOfLimit">eachOfLimit</a></li><li data-type="method" class="toc-method"><a href="docs.html#eachOfSeries">eachOfSeries</a></li><li data-type="method" class="toc-method"><a href="docs.html#eachSeries">eachSeries</a></li><li data-type="method" class="toc-method"><a href="docs.html#every">every</a></li><li data-type="method" class="toc-method"><a href="docs.html#everyLimit">everyLimit</a></li><li data-type="method" class="toc-method"><a href="docs.html#everySeries">everySeries</a></li><li data-type="method" class="toc-method"><a href="docs.html#filter">filter</a></li><li data-type="method" class="toc-method"><a href="docs.html#filterLimit">filterLimit</a></li><li data-type="method" class="toc-method"><a href="docs.html#filterSeries">filterSeries</a></li><li data-type="method" class="toc-method"><a href="docs.html#map">map</a></li><li data-type="method" class="toc-method"><a href="docs.html#mapLimit">mapLimit</a></li><li data-type="method" class="toc-method"><a href="docs.html#mapSeries">mapSeries</a></li><li data-type="method" class="toc-method"><a href="docs.html#mapValues">mapValues</a></li><li data-type="method" class="toc-method"><a href="docs.html#mapValuesLimit">mapValuesLimit</a></li><li data-type="method" class="toc-method"><a href="docs.html#mapValuesSeries">mapValuesSeries</a></li><li data-type="method" class="toc-method"><a href="docs.html#reduce">reduce</a></li><li data-type="method" class="toc-method"><a href="docs.html#reduceRight">reduceRight</a></li><li data-type="method" class="toc-method"><a href="docs.html#reject">reject</a></li><li data-type="method" class="toc-method"><a href="docs.html#rejectLimit">rejectLimit</a></li><li data-type="method" class="toc-method"><a href="docs.html#rejectSeries">rejectSeries</a></li><li data-type="method" class="toc-method"><a href="docs.html#some">some</a></li><li data-type="method" class="toc-method"><a href="docs.html#someLimit">someLimit</a></li><li data-type="method" class="toc-method"><a href="docs.html#someSeries">someSeries</a></li><li data-type="method" class="toc-method"><a href="docs.html#sortBy">sortBy</a></li><li data-type="method" class="toc-method"><a href="docs.html#transform">transform</a></li><li class="toc-header"><a href="docs.html#controlflow">Control Flow</a></li><li data-type="method" class="toc-method"><a href="docs.html#applyEach">applyEach</a></li><li data-type="method" class="toc-method"><a href="docs.html#applyEachSeries">applyEachSeries</a></li><li data-type="method" class="toc-method"><a href="docs.html#auto">auto</a></li><li data-type="method" class="toc-method"><a href="docs.html#autoInject">autoInject</a></li><li data-type="method" class="toc-method"><a href="docs.html#cargo">cargo</a></li><li data-type="method" class="toc-method"><a href="docs.html#compose">compose</a></li><li data-type="method" class="toc-method"><a href="docs.html#doDuring">doDuring</a></li><li data-type="method" class="toc-method"><a href="docs.html#doUntil">doUntil</a></li><li data-type="method" class="toc-method"><a href="docs.html#doWhilst">doWhilst</a></li><li data-type="method" class="toc-method"><a href="docs.html#during">during</a></li><li data-type="method" class="toc-method"><a href="docs.html#forever">forever</a></li><li data-type="method" class="toc-method"><a href="docs.html#parallel">parallel</a></li><li data-type="method" class="toc-method"><a href="docs.html#parallelLimit">parallelLimit</a></li><li data-type="method" class="toc-method"><a href="docs.html#priorityQueue">priorityQueue</a></li><li data-type="method" class="toc-method"><a href="docs.html#queue">queue</a></li><li data-type="method" class="toc-method"><a href="docs.html#race">race</a></li><li data-type="method" class="toc-method"><a href="docs.html#retry">retry</a></li><li data-type="method" class="toc-method"><a href="docs.html#retryable">retryable</a></li><li data-type="method" class="toc-method"><a href="docs.html#seq">seq</a></li><li data-type="method" class="toc-method"><a href="docs.html#series">series</a></li><li data-type="method" class="toc-method"><a href="docs.html#times">times</a></li><li data-type="method" class="toc-method"><a href="docs.html#timesLimit">timesLimit</a></li><li data-type="method" class="toc-method"><a href="docs.html#timesSeries">timesSeries</a></li><li data-type="method" class="toc-method"><a href="docs.html#until">until</a></li><li data-type="method" class="toc-method"><a href="docs.html#waterfall">waterfall</a></li><li data-type="method" class="toc-method"><a href="docs.html#whilst">whilst</a></li><li class="toc-header"><a href="docs.html#utils">Utils</a></li><li data-type="method" class="toc-method active"><a href="docs.html#apply">apply</a></li><li data-type="method" class="toc-method"><a href="docs.html#asyncify">asyncify</a></li><li data-type="method" class="toc-method"><a href="docs.html#constant">constant</a></li><li data-type="method" class="toc-method"><a href="docs.html#dir">dir</a></li><li data-type="method" class="toc-method"><a href="docs.html#ensureAsync">ensureAsync</a></li><li data-type="method" class="toc-method"><a href="docs.html#log">log</a></li><li data-type="method" class="toc-method"><a href="docs.html#memoize">memoize</a></li><li data-type="method" class="toc-method"><a href="docs.html#nextTick">nextTick</a></li><li data-type="method" class="toc-method"><a href="docs.html#reflect">reflect</a></li><li data-type="method" class="toc-method"><a href="docs.html#reflectAll">reflectAll</a></li><li data-type="method" class="toc-method"><a href="docs.html#setImmediate">setImmediate</a></li><li data-type="method" class="toc-method"><a href="docs.html#timeout">timeout</a></li><li data-type="method" class="toc-method"><a href="docs.html#unmemoize">unmemoize</a></li></ul> | ||
</nav> | ||
|
||
<br class="clear"> | ||
|
||
|
||
|
||
|
||
<script src="https://cdn.jsdelivr.net/prettify/0.1/prettify.js"></script> | ||
|
||
<script src="https://cdn.jsdelivr.net/jquery/2.2.4/jquery.min.js"></script> | ||
<script src="https://cdn.jsdelivr.net/bootstrap/3.3.6/js/bootstrap.min.js"></script> | ||
<script src="https://cdn.jsdelivr.net/typeahead.js/0.11.1/typeahead.bundle.min.js"></script> | ||
<script>prettyPrint();</script> | ||
<script src="scripts/async.js"></script> | ||
|
||
<script src="scripts/linenumber.js" async></script> | ||
<script src="scripts/jsdoc-custom.js" async></script> | ||
</body> |
Oops, something went wrong.