gulp-jsdoc
Version:
A jsdoc plugin for Gulp
555 lines (246 loc) • 9.9 kB
HTML
<html lang="en">
<head>
<meta charset="utf-8">
<title>gulp-jsdoc Class: _</title>
<!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<link type="text/css" rel="stylesheet" href="styles/sunlight.default.css">
<link type="text/css" rel="stylesheet" href="styles/site.journal.css">
</head>
<body>
<div class="container-fluid">
<div class="navbar navbar-fixed-top ">
<div class="navbar-inner">
<a class="brand" href="index.html">gulp-jsdoc</a>
<ul class="nav">
<li class="dropdown">
<a href="classes.list.html" class="dropdown-toggle" data-toggle="dropdown">Classes<b
class="caret"></b></a>
<ul class="dropdown-menu ">
<li>
<a href="_.html">_</a>
</li>
</ul>
</li>
</ul>
</div>
</div>
<div class="row-fluid">
<div class="span8">
<div id="main">
<h1 class="page-title">Class: _</h1>
<section>
<header>
<h2>
_
</h2>
</header>
<article>
<div class="container-overview">
<dt>
<h4 class="name" id="_"><span class="type-signature"></span>new _<span class="signature">(value)</span><span class="type-signature"> → {Object}</span></h4>
</dt>
<dd>
<div class="description">
Creates a `lodash` object which wraps the given value to enable intuitive
method chaining.
In addition to Lo-Dash methods, wrappers also have the following `Array` methods:
`concat`, `join`, `pop`, `push`, `reverse`, `shift`, `slice`, `sort`, `splice`,
and `unshift`
Chaining is supported in custom builds as long as the `value` method is
implicitly or explicitly included in the build.
The chainable wrapper functions are:
`after`, `assign`, `at`, `bind`, `bindAll`, `bindKey`, `chain`, `compact`,
`compose`, `concat`, `constant`, `countBy`, `create`, `createCallback`,
`curry`, `debounce`, `defaults`, `defer`, `delay`, `difference`, `filter`,
`flatten`, `forEach`, `forEachRight`, `forIn`, `forInRight`, `forOwn`,
`forOwnRight`, `functions`, `groupBy`, `indexBy`, `initial`, `intersection`,
`invert`, `invoke`, `keys`, `map`, `mapValues`, `matches`, `max`, `memoize`,
`merge`, `min`, `noop`, `object`, `omit`, `once`, `pairs`, `partial`,
`partialRight`, `pick`, `pluck`, `property`, `pull`, `push`, `range`,
`reject`, `remove`, `rest`, `reverse`, `shuffle`, `slice`, `sort`, `sortBy`,
`splice`, `tap`, `throttle`, `times`, `toArray`, `transform`, `union`,
`uniq`, `unshift`, `unzip`, `values`, `where`, `without`, `wrap`, `xor`,
and `zip`
The non-chainable wrapper functions are:
`capitalize`, `clone`, `cloneDeep`, `contains`, `escape`, `every`, `find`,
`findIndex`, `findKey`, `findLast`, `findLastIndex`, `findLastKey`, `has`,
`identity`, `indexOf`, `isArguments`, `isArray`, `isBoolean`, `isDate`,
`isElement`, `isEmpty`, `isEqual`, `isFinite`, `isFunction`, `isNaN`,
`isNull`, `isNumber`, `isObject`, `isPlainObject`, `isRegExp`, `isString`,
`isUndefined`, `join`, `lastIndexOf`, `mixin`, `noConflict`, `now`,
`parseInt`, `pop`, `random`, `reduce`, `reduceRight`, `result`, `shift`,
`size`, `some`, `sortedIndex`, `runInContext`, `template`, `trim`,
`trimLeft`, `trimRight`, `unescape`, `uniqueId`, and `value`
The wrapper functions `first`, `last`, and `sample` return wrapped values
when `n` is provided, otherwise they return unwrapped values.
Explicit chaining can be enabled by using the `_.chain` method.
</div>
<h5>Parameters:</h5>
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>value</code></td>
<td class="type">
<span class="param-type">*</span>
</td>
<td class="description last">The value to wrap in a `lodash` instance.</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="lodash.js.html">test/fixtures/lodash.js</a>, <a href="lodash.js.html#sunlight-1-line-688">line 688</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
Returns a `lodash` instance.
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">Object</span>
</dd>
</dl>
<h5>Example</h5>
<pre class="sunlight-highlight-javascript">var wrapped = _([1, 2, 3]);
// returns an unwrapped value
wrapped.reduce(function(sum, num) {
return sum + num;
});
// => 6
// returns a wrapped value
var squares = wrapped.map(function(num) {
return num * num;
});
_.isArray(squares);
// => false
_.isArray(squares.value());
// => true</pre>
</dd>
</div>
<h3 class="subsection-title">Members</h3>
<dl>
<dt>
<h4 class="name" id="chain"><span class="type-signature"><static> </span>chain<span class="type-signature"></span></h4>
</dt>
<dd>
<div class="description">
Enables explicit method chaining on the wrapper object.
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="lodash.js.html">test/fixtures/lodash.js</a>, <a href="lodash.js.html#sunlight-1-line-3543">line 3543</a>
</li></ul></dd>
</dl>
<h5>Example</h5>
<pre class="sunlight-highlight-javascript">var characters = [
{ 'name': 'barney', 'age': 36 },
{ 'name': 'fred', 'age': 40 }
];
// without explicit chaining
_(characters).first();
// => { 'name': 'barney', 'age': 36 }
// with explicit chaining
_(characters).chain()
.first()
.pick('age')
.value();
// => { 'age': 36 }</pre>
</dd>
<dt>
<h4 class="name" id="toString"><span class="type-signature"><static> </span>toString<span class="type-signature"></span></h4>
</dt>
<dd>
<div class="description">
Produces the `toString` result of the wrapped value.
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="lodash.js.html">test/fixtures/lodash.js</a>, <a href="lodash.js.html#sunlight-1-line-3573">line 3573</a>
</li></ul></dd>
</dl>
<h5>Example</h5>
<pre class="sunlight-highlight-javascript">_([1, 2, 3]).toString();
// => '1,2,3'</pre>
</dd>
<dt>
<h4 class="name" id="valueOf"><span class="type-signature"><static> </span>valueOf<span class="type-signature"></span></h4>
</dt>
<dd>
<div class="description">
Extracts the wrapped value.
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="lodash.js.html">test/fixtures/lodash.js</a>, <a href="lodash.js.html#sunlight-1-line-3589">line 3589</a>
</li></ul></dd>
</dl>
<h5>Example</h5>
<pre class="sunlight-highlight-javascript">_([1, 2, 3]).valueOf();
// => [1, 2, 3]</pre>
</dd>
</dl>
</article>
</section>
</div>
<div class="clearfix"></div>
<footer>
Generated with gulp
<br />
<span class="copyright">
Copyright WebItUp 2014
</span>
<br />
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.3.0-alpha4</a>
on Wed Mar 26 2014 16:45:14 GMT+0100 (CET) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
</span>
</footer>
</div>
<div class="span3">
<div id="toc"></div>
</div>
<br clear="both">
</div>
</div>
<script src="scripts/sunlight.js"></script>
<script src="scripts/sunlight.javascript.js"></script>
<script src="scripts/sunlight-plugin.doclinks.js"></script>
<script src="scripts/sunlight-plugin.linenumbers.js"></script>
<script src="scripts/sunlight-plugin.menu.js"></script>
<script src="scripts/jquery.min.js"></script>
<script src="scripts/jquery.scrollTo.js"></script>
<script src="scripts/jquery.localScroll.js"></script>
<script src="scripts/bootstrap-dropdown.js"></script>
<script src="scripts/toc.js"></script>
<script> Sunlight.highlightAll({lineNumbers:true, showMenu: true, enableDoclinks :true}); </script>
<script>
$( function () {
$( "#toc" ).toc( {
selectors : "h1,h2,h3,h4",
showAndHide : false,
scrollTo : 60
} );
$( "#toc>ul" ).addClass( "nav nav-pills nav-stacked" );
$( "#main span[id^='toc']" ).addClass( "toc-shim" );
} );
</script>
</body>
</html>