flavor-js
Version:
FlavorJS the definitive JS natives chainable extensions methods (based on lodash & ES6)
2,266 lines (753 loc) • 41.6 kB
HTML
<html lang="en">
<head>
<meta charset="utf-8">
<title>lodash - Documentation</title>
<script src="scripts/prettify/prettify.js"></script>
<script src="scripts/prettify/lang-css.js"></script>
<!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<link type="text/css" rel="stylesheet" href="styles/prettify.css">
<link type="text/css" rel="stylesheet" href="styles/jsdoc.css">
</head>
<body>
<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>
<nav>
<h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="FlavorJS.html">FlavorJS</a><ul class='methods'><li data-type='method'><a href="FlavorJS.html#delay">delay</a></li><li data-type='method'><a href="FlavorJS.html#extendArray">extendArray</a></li><li data-type='method'><a href="FlavorJS.html#extendBoolean">extendBoolean</a></li><li data-type='method'><a href="FlavorJS.html#extendDate">extendDate</a></li><li data-type='method'><a href="FlavorJS.html#extendFunction">extendFunction</a></li><li data-type='method'><a href="FlavorJS.html#extendLodash">extendLodash</a></li><li data-type='method'><a href="FlavorJS.html#extendNumber">extendNumber</a></li><li data-type='method'><a href="FlavorJS.html#extendObject">extendObject</a></li><li data-type='method'><a href="FlavorJS.html#extendPrototype">extendPrototype</a></li><li data-type='method'><a href="FlavorJS.html#extendPrototypeProperty">extendPrototypeProperty</a></li><li data-type='method'><a href="FlavorJS.html#extendString">extendString</a></li><li data-type='method'><a href="FlavorJS.html#init">init</a></li></ul></li></ul><h3>Namespaces</h3><ul><li><a href="array.html">array</a><ul class='methods'><li data-type='method'><a href="array.html#clone">clone</a></li><li data-type='method'><a href="array.html#concat">concat</a></li><li data-type='method'><a href="array.html#contains">contains</a></li><li data-type='method'><a href="array.html#containsBy">containsBy</a></li><li data-type='method'><a href="array.html#countBy">countBy</a></li><li data-type='method'><a href="array.html#cut">cut</a></li><li data-type='method'><a href="array.html#deepFindBy">deepFindBy</a></li><li data-type='method'><a href="array.html#deepMap">deepMap</a></li><li data-type='method'><a href="array.html#deepSortBy">deepSortBy</a></li><li data-type='method'><a href="array.html#diff">diff</a></li><li data-type='method'><a href="array.html#diffBy">diffBy</a></li><li data-type='method'><a href="array.html#distinct">distinct</a></li><li data-type='method'><a href="array.html#each">each</a></li><li data-type='method'><a href="array.html#filterBy">filterBy</a></li><li data-type='method'><a href="array.html#findBy">findBy</a></li><li data-type='method'><a href="array.html#first">first</a></li><li data-type='method'><a href="array.html#flatten">flatten</a></li><li data-type='method'><a href="array.html#indexBy">indexBy</a></li><li data-type='method'><a href="array.html#intersection">intersection</a></li><li data-type='method'><a href="array.html#isArray">isArray</a></li><li data-type='method'><a href="array.html#last">last</a></li><li data-type='method'><a href="array.html#lorem">lorem</a></li><li data-type='method'><a href="array.html#maxBy">maxBy</a></li><li data-type='method'><a href="array.html#pull">pull</a></li><li data-type='method'><a href="array.html#pullBy">pullBy</a></li><li data-type='method'><a href="array.html#random">random</a></li><li data-type='method'><a href="array.html#removeBy">removeBy</a></li><li data-type='method'><a href="array.html#shuffle">shuffle</a></li><li data-type='method'><a href="array.html#sortBy">sortBy</a></li><li data-type='method'><a href="array.html#split">split</a></li><li data-type='method'><a href="array.html#sum">sum</a></li><li data-type='method'><a href="array.html#tail">tail</a></li><li data-type='method'><a href="array.html#tail">tail</a></li><li data-type='method'><a href="array.html#union">union</a></li></ul></li><li><a href="boolean.html">boolean</a><ul class='methods'><li data-type='method'><a href="boolean.html#isBoolean">isBoolean</a></li><li data-type='method'><a href="boolean.html#random">random</a></li></ul></li><li><a href="date.html">date</a><ul class='methods'><li data-type='method'><a href="date.html#isDate">isDate</a></li><li data-type='method'><a href="date.html#random">random</a></li><li data-type='method'><a href="date.html#toTimestamp">toTimestamp</a></li></ul></li><li><a href="function.html">function</a><ul class='methods'><li data-type='method'><a href="function.html#isFunction">isFunction</a></li><li data-type='method'><a href="function.html#proxy">proxy</a></li></ul></li><li><a href="lodash.html">lodash</a><ul class='methods'><li data-type='method'><a href="lodash.html#deepFindBy">deepFindBy</a></li><li data-type='method'><a href="lodash.html#deepMap">deepMap</a></li><li data-type='method'><a href="lodash.html#deepOrderBy">deepOrderBy</a></li><li data-type='method'><a href="lodash.html#filterByValues">filterByValues</a></li><li data-type='method'><a href="lodash.html#isPercentage">isPercentage</a></li><li data-type='method'><a href="lodash.html#parsePercentage">parsePercentage</a></li><li data-type='method'><a href="lodash.html#pullAllByComparator">pullAllByComparator</a></li><li data-type='method'><a href="lodash.html#timesRange">timesRange</a></li><li data-type='method'><a href="lodash.html#timesReverse">timesReverse</a></li></ul></li><li><a href="number.html">number</a><ul class='methods'><li data-type='method'><a href="number.html#between">between</a></li><li data-type='method'><a href="number.html#degreeDiff">degreeDiff</a></li><li data-type='method'><a href="number.html#degreeDir">degreeDir</a></li><li data-type='method'><a href="number.html#degreeWrap">degreeWrap</a></li><li data-type='method'><a href="number.html#floor">floor</a></li><li data-type='method'><a href="number.html#fromRoman">fromRoman</a></li><li data-type='method'><a href="number.html#isNumber">isNumber</a></li><li data-type='method'><a href="number.html#parse">parse</a></li><li data-type='method'><a href="number.html#random">random</a></li><li data-type='method'><a href="number.html#range">range</a></li><li data-type='method'><a href="number.html#round">round</a></li><li data-type='method'><a href="number.html#round">round</a></li><li data-type='method'><a href="number.html#times">times</a></li><li data-type='method'><a href="number.html#toAbsolute">toAbsolute</a></li><li data-type='method'><a href="number.html#toCurrency">toCurrency</a></li><li data-type='method'><a href="number.html#toFileSize">toFileSize</a></li><li data-type='method'><a href="number.html#toRoman">toRoman</a></li><li data-type='method'><a href="number.html#toSymbolString">toSymbolString</a></li></ul></li><li><a href="object.html">object</a><ul class='methods'><li data-type='method'><a href="object.html#clone">clone</a></li><li data-type='method'><a href="object.html#each">each</a></li><li data-type='method'><a href="object.html#inherit">inherit</a></li><li data-type='method'><a href="object.html#isObject">isObject</a></li><li data-type='method'><a href="object.html#omit">omit</a></li><li data-type='method'><a href="object.html#path">path</a></li><li data-type='method'><a href="object.html#pick">pick</a></li></ul></li><li><a href="string.html">string</a><ul class='methods'><li data-type='method'><a href="string.html#camelCase">camelCase</a></li><li data-type='method'><a href="string.html#capitalize">capitalize</a></li><li data-type='method'><a href="string.html#contains">contains</a></li><li data-type='method'><a href="string.html#decodeURI">decodeURI</a></li><li data-type='method'><a href="string.html#encodeURI">encodeURI</a></li><li data-type='method'><a href="string.html#endsWith">endsWith</a></li><li data-type='method'><a href="string.html#escapeHTML">escapeHTML</a></li><li data-type='method'><a href="string.html#escapeHTML">escapeHTML</a></li><li data-type='method'><a href="string.html#extractDomain">extractDomain</a></li><li data-type='method'><a href="string.html#extractFileExtension">extractFileExtension</a></li><li data-type='method'><a href="string.html#extractQueryString">extractQueryString</a></li><li data-type='method'><a href="string.html#guid">guid</a></li><li data-type='method'><a href="string.html#isRoman">isRoman</a></li><li data-type='method'><a href="string.html#isString">isString</a></li><li data-type='method'><a href="string.html#isUrl">isUrl</a></li><li data-type='method'><a href="string.html#pad">pad</a></li><li data-type='method'><a href="string.html#padLeft">padLeft</a></li><li data-type='method'><a href="string.html#padRight">padRight</a></li><li data-type='method'><a href="string.html#parsePercentage">parsePercentage</a></li><li data-type='method'><a href="string.html#parsePercentage">parsePercentage</a></li><li data-type='method'><a href="string.html#replaceAll">replaceAll</a></li><li data-type='method'><a href="string.html#slugify">slugify</a></li><li data-type='method'><a href="string.html#startsWith">startsWith</a></li><li data-type='method'><a href="string.html#stripTags">stripTags</a></li><li data-type='method'><a href="string.html#toArray">toArray</a></li><li data-type='method'><a href="string.html#toInt">toInt</a></li></ul></li></ul><h3><a href="global.html">Global</a></h3>
</nav>
<div id="main">
<h1 class="page-title">lodash</h1>
<section>
<header>
<h2>
lodash
</h2>
</header>
<article>
<div class="container-overview">
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Extensions_lodash.js.html">Extensions/lodash.js</a>, <a href="Extensions_lodash.js.html#line6">line 6</a>
</li></ul></dd>
</dl>
<div class="description">all the mixins added to _</div>
</div>
<h3 class="subsection-title">Methods</h3>
<h4 class="name" id="deepFindBy"><span class="type-signature"></span>deepFindBy<span class="signature">(collection, propName, propValue, childrenPropName<span class="signature-attributes">opt</span>)</span><span class="type-signature"> → {*}</span></h4>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Extensions_lodash.js.html">Extensions/lodash.js</a>, <a href="Extensions_lodash.js.html#line137">line 137</a>
</li></ul></dd>
</dl>
<div class="description">
deeply searches in a recursive tree structure with (same structure) childrenPropName or 'children' property<br>
looking for an item with the propName === propValue<br><br>
</div>
<h5>Example</h5>
<p class="code-caption">eg. usage</p>
<pre class="prettyprint"><code>var tree = [{
id: '1', status: 'enabled', items: [{
id: '1.1', status: 'enabled', items: [{
id: '1.1.1', status: 'enabled'
}, {
id: '1.1.2', status: 'disabled'
}]
}, {
id: '1.2', status: 'disabled'
}]
}, {
id: '2', status: 'disabled', items: [{
id: '2.1', status: 'enabled'
}, {
id: '2.2', status: 'enabled'
}]
}, {
id: '3', status: 'enabled', items: [{
id: '3.1', status: 'disabled'
}, {
id: '3.2', status: 'enabled'
}, {
id: '3.3', status: 'enabled'
}]
}];
console.log(_.deepFindBy(tree, 'id', '1.1.1', 'items');
// logs {
id: '1.1.1', status: 'enabled'
}
console.log(_.deepFindBy(tree, function(item) {
return item.id === '3.2'
}, null, 'items');
// logs {
id: '3.2', status: 'enabled'
}</code></pre>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Attributes</th>
<th>Default</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>collection</code></td>
<td class="type">
<span class="param-type">Array</span>
|
<span class="param-type"><a href="object.html">object</a></span>
</td>
<td class="attributes">
</td>
<td class="default">
</td>
<td class="description last">the collection</td>
</tr>
<tr>
<td class="name"><code>propName</code></td>
<td class="type">
<span class="param-type"><a href="string.html">string</a></span>
|
<span class="param-type"><a href="function.html">function</a></span>
</td>
<td class="attributes">
</td>
<td class="default">
</td>
<td class="description last">the property name or the predicate function to invoke (item will be passed as parameter to the predicate)</td>
</tr>
<tr>
<td class="name"><code>propValue</code></td>
<td class="type">
<span class="param-type">*</span>
</td>
<td class="attributes">
</td>
<td class="default">
</td>
<td class="description last">the property value</td>
</tr>
<tr>
<td class="name"><code>childrenPropName</code></td>
<td class="type">
<span class="param-type"><a href="string.html">string</a></span>
</td>
<td class="attributes">
<optional><br>
</td>
<td class="default">
<code>'children'</code>
</td>
<td class="description last">the children prop name</td>
</tr>
</tbody>
</table>
<h5>Returns:</h5>
<dl class="param-type">
<dt>
Type
</dt>
<dd>
<span class="param-type">*</span>
</dd>
</dl>
<h4 class="name" id="deepMap"><span class="type-signature"></span>deepMap<span class="signature">(collection, childrenPropName<span class="signature-attributes">opt</span>, mapCallback)</span><span class="type-signature"></span></h4>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Extensions_lodash.js.html">Extensions/lodash.js</a>, <a href="Extensions_lodash.js.html#line84">line 84</a>
</li></ul></dd>
</dl>
<div class="description">
deeply maps a recursive tree structure with (same structure) childrenPropName or 'children' property<br><br>
</div>
<h5>Example</h5>
<p class="code-caption">eg. usage</p>
<pre class="prettyprint"><code>var tree = [{
id: '1', status: 'enabled', items: [{
id: '1.1', status: 'enabled', items: [{
id: '1.1.1', status: 'enabled'
}, {
id: '1.1.2', status: 'disabled'
}]
}, {
id: '1.2', status: 'disabled'
}]
}];
console.log(_.deepMap(tree, 'items', function(treeItem) {
return {
id: treeItem.id,
status: treeItem.status,
combo: treeItem.id + '-' + treeItem.status
};
});
// logs [{
id: '1', status: 'enabled', combo: '1-enabled' items: [{
id: '1.1', status: 'enabled', combo: '1.1-enabled', items: [{
id: '1.1.1', status: 'enabled', combo: '1.1.1-enabled'
}, {
id: '1.1.2', status: 'disabled', combo: '1.1.2-disabled'
}]
}, {
id: '1.2', status: 'disabled', combo: '1.2-disabled'
}]
}]</code></pre>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Attributes</th>
<th>Default</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>collection</code></td>
<td class="type">
<span class="param-type">Array</span>
|
<span class="param-type"><a href="object.html">object</a></span>
</td>
<td class="attributes">
</td>
<td class="default">
</td>
<td class="description last">the collection to use for the deep mapping</td>
</tr>
<tr>
<td class="name"><code>childrenPropName</code></td>
<td class="type">
<span class="param-type"><a href="string.html">string</a></span>
</td>
<td class="attributes">
<optional><br>
</td>
<td class="default">
<code>'children'</code>
</td>
<td class="description last">the property name to use for children collection</td>
</tr>
<tr>
<td class="name"><code>mapCallback</code></td>
<td class="type">
<span class="param-type"><a href="function.html">function</a></span>
</td>
<td class="attributes">
</td>
<td class="default">
</td>
<td class="description last">the item mapping callback</td>
</tr>
</tbody>
</table>
<h4 class="name" id="deepOrderBy"><span class="type-signature"></span>deepOrderBy<span class="signature">(collection, propNames, propDirections, childrenPropName<span class="signature-attributes">opt</span>)</span><span class="type-signature"> → {Array|<a href="object.html">object</a>}</span></h4>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Extensions_lodash.js.html">Extensions/lodash.js</a>, <a href="Extensions_lodash.js.html#line210">line 210</a>
</li></ul></dd>
</dl>
<div class="description">
deeply sorts a recursive tree structure with (same structure) childrenPropName or 'children' property<br><br>
</div>
<h5>Example</h5>
<p class="code-caption">eg. usage</p>
<pre class="prettyprint"><code>var tree = [{
id: '1', status: 'enabled', items: [{
id: '1.1', status: 'enabled', items: [{
id: '1.1.1', status: 'enabled'
}, {
id: '1.1.2', status: 'disabled'
}]
}, {
id: '1.2', status: 'disabled'
}]
}, {
id: '2', status: 'disabled', items: [{
id: '2.1', status: 'enabled'
}, {
id: '2.2', status: 'enabled'
}]
}, {
id: '3', status: 'enabled', items: [{
id: '3.1', status: 'disabled'
}, {
id: '3.2', status: 'enabled'
}, {
id: '3.3', status: 'enabled'
}]
}];
console.log(_.deepOrderBy(tree, ['id'], ['desc'], 'items');
// logs [{
id: '3', status: 'enabled', items: [{
id: '3.3', status: 'enabled'
}, {
id: '3.2', status: 'disabled'
}, {
id: '3.1', status: 'enabled'
}]
}, {
id: '2', status: 'disabled', items: [{
id: '2.2', status: 'enabled'
}, {
id: '2.1', status: 'enabled'
}]
}, {
id: '1', status: 'enabled', items: [{
id: '1.2', status: 'disabled'
}, {
id: '1.1', status: 'enabled', items: [{
id: '1.1.2', status: 'enabled'
}, {
id: '1.1.1', status: 'disabled'
}]
}]
}]</code></pre>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Attributes</th>
<th>Default</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>collection</code></td>
<td class="type">
<span class="param-type">Array</span>
|
<span class="param-type"><a href="object.html">object</a></span>
</td>
<td class="attributes">
</td>
<td class="default">
</td>
<td class="description last">the collection</td>
</tr>
<tr>
<td class="name"><code>propNames</code></td>
<td class="type">
<span class="param-type">Array</span>
|
<span class="param-type"><a href="string.html">string</a></span>
</td>
<td class="attributes">
</td>
<td class="default">
</td>
<td class="description last">the list of property names to sort</td>
</tr>
<tr>
<td class="name"><code>propDirections</code></td>
<td class="type">
<span class="param-type">Array</span>
|
<span class="param-type"><a href="string.html">string</a></span>
</td>
<td class="attributes">
</td>
<td class="default">
</td>
<td class="description last">the list of order by direction to use with propNames</td>
</tr>
<tr>
<td class="name"><code>childrenPropName</code></td>
<td class="type">
<span class="param-type"><a href="string.html">string</a></span>
</td>
<td class="attributes">
<optional><br>
</td>
<td class="default">
<code>'children'</code>
</td>
<td class="description last">the children prop name</td>
</tr>
</tbody>
</table>
<h5>Returns:</h5>
<dl class="param-type">
<dt>
Type
</dt>
<dd>
<span class="param-type">Array</span>
|
<span class="param-type"><a href="object.html">object</a></span>
</dd>
</dl>
<h4 class="name" id="filterByValues"><span class="type-signature"></span>filterByValues<span class="signature">(collection, key, values)</span><span class="type-signature"> → {Array}</span></h4>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Extensions_lodash.js.html">Extensions/lodash.js</a>, <a href="Extensions_lodash.js.html#line55">line 55</a>
</li></ul></dd>
</dl>
<div class="description">
filters a collection with a list of values specified for one property<br><br>
</div>
<h5>Example</h5>
<p class="code-caption">eg. usage</p>
<pre class="prettyprint"><code>var collection = [{
id: 1, status: 'active'
}, {
id: 2, status: 'disabled'
}, {
id: 3, status: 'unactive'
}];
var allowedValues = ['active', 'unactive'];
console.log(_.filterByValues(collection, 'status', allowedValues);
// logs [{id: 1, status: 'active'}, {id: 3, status: 'unactive'}]</code></pre>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>collection</code></td>
<td class="type">
<span class="param-type">Array</span>
|
<span class="param-type"><a href="object.html">object</a></span>
</td>
<td class="description last">the collection to filter</td>
</tr>
<tr>
<td class="name"><code>key</code></td>
<td class="type">
<span class="param-type"><a href="string.html">string</a></span>
</td>
<td class="description last">the key to be used as property name</td>
</tr>
<tr>
<td class="name"><code>values</code></td>
<td class="type">
<span class="param-type">Array</span>
</td>
<td class="description last">the list of values to check</td>
</tr>
</tbody>
</table>
<h5>Returns:</h5>
<dl class="param-type">
<dt>
Type
</dt>
<dd>
<span class="param-type">Array</span>
</dd>
</dl>
<h4 class="name" id="isPercentage"><span class="type-signature"></span>isPercentage<span class="signature">(s)</span><span class="type-signature"> → {<a href="boolean.html">boolean</a>}</span></h4>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Extensions_lodash.js.html">Extensions/lodash.js</a>, <a href="Extensions_lodash.js.html#line11">line 11</a>
</li></ul></dd>
</dl>
<div class="description">
checks if a string is a percentage value<br><br>
</div>
<h5>Example</h5>
<p class="code-caption">eg. usage</p>
<pre class="prettyprint"><code>var s = '23.97%';
console.log(_.isPercentage(s)); // true
console.log(_.isPercentage('50%')); // true
console.log(_.isPercentage(10)); // false</code></pre>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>s</code></td>
<td class="type">
<span class="param-type"><a href="string.html">string</a></span>
</td>
<td class="description last">the string</td>
</tr>
</tbody>
</table>
<h5>Returns:</h5>
<dl class="param-type">
<dt>
Type
</dt>
<dd>
<span class="param-type"><a href="boolean.html">boolean</a></span>
</dd>
</dl>
<h4 class="name" id="parsePercentage"><span class="type-signature"></span>parsePercentage<span class="signature">(s)</span><span class="type-signature"> → {null|<a href="number.html">number</a>}</span></h4>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Extensions_lodash.js.html">Extensions/lodash.js</a>, <a href="Extensions_lodash.js.html#line31">line 31</a>
</li></ul></dd>
</dl>
<div class="description">
parses float value in a percentage string<br><br>
</div>
<h5>Example</h5>
<p class="code-caption">eg. usage</p>
<pre class="prettyprint"><code>var p = '50.5%';
console.log(_.parsePercentage(p)); // 50.5
console.log(_.parsePercentage('100%')); // 100
console.log(_.parsePercentage(25.3)); // null</code></pre>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>s</code></td>
<td class="type">
<span class="param-type"><a href="string.html">string</a></span>
</td>
<td class="description last">the percentage string</td>
</tr>
</tbody>
</table>
<h5>Returns:</h5>
<dl class="param-type">
<dt>
Type
</dt>
<dd>
<span class="param-type">null</span>
|
<span class="param-type"><a href="number.html">number</a></span>
</dd>
</dl>
<h4 class="name" id="pullAllByComparator"><span class="type-signature"></span>pullAllByComparator<span class="signature">(collection, values, comparator, iteratee)</span><span class="type-signature"> → {<a href="array.html">array</a>}</span></h4>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Extensions_lodash.js.html">Extensions/lodash.js</a>, <a href="Extensions_lodash.js.html#line302">line 302</a>
</li></ul></dd>
<dt class="tag-todo">To Do:</dt>
<dd class="tag-todo">
<ul>
<li>document method</li>
</ul>
</dd>
</dl>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>collection</code></td>
<td class="type">
<span class="param-type"><a href="global.html#collection">collection</a></span>
</td>
<td class="description last"></td>
</tr>
<tr>
<td class="name"><code>values</code></td>
<td class="type">
<span class="param-type"><a href="array.html">array</a></span>
</td>
<td class="description last"></td>
</tr>
<tr>
<td class="name"><code>comparator</code></td>
<td class="type">
<span class="param-type"><a href="function.html">function</a></span>
</td>
<td class="description last"></td>
</tr>
<tr>
<td class="name"><code>iteratee</code></td>
<td class="type">
<span class="param-type"><a href="function.html">function</a></span>
</td>
<td class="description last"></td>
</tr>
</tbody>
</table>
<h5>Returns:</h5>
<dl class="param-type">
<dt>
Type
</dt>
<dd>
<span class="param-type"><a href="array.html">array</a></span>
</dd>
</dl>
<h4 class="name" id="timesRange"><span class="type-signature"></span>timesRange<span class="signature">(start, end, iteratee, reverse)</span><span class="type-signature"></span></h4>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Extensions_lodash.js.html">Extensions/lodash.js</a>, <a href="Extensions_lodash.js.html#line351">line 351</a>
</li></ul></dd>
</dl>
<div class="description">
an implementation of _.times by lodash, where you can specify start & end numbers<br><br>
</div>
<h5>Examples</h5>
<p class="code-caption">eg. usage</p>
<pre class="prettyprint"><code>_.timesRange(5, 10, function(i) {
console.log(i);
});
// logs
5
6
7
8
9
10</code></pre>
<p class="code-caption">or</p>
<pre class="prettyprint"><code>_.timesRange(5, 10, function(i) {
console.log(i);
}, true);
// logs
10
9
8
7
6
5</code></pre>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>start</code></td>
<td class="type">
<span class="param-type"><a href="number.html">number</a></span>
</td>
<td class="description last">start num of times to invoke iteratee</td>
</tr>
<tr>
<td class="name"><code>end</code></td>
<td class="type">
<span class="param-type"><a href="number.html">number</a></span>
</td>
<td class="description last">end num of times to invoke iteratee</td>
</tr>
<tr>
<td class="name"><code>iteratee</code></td>
<td class="type">
<span class="param-type"><a href="function.html">function</a></span>
</td>
<td class="description last">the iteratee function to invoke<br>
the iteratee will be invoked passing che cycle indicator as i<br>
so the iteratee has to be something like this<br>
<pre>
function(i) {}
</pre></td>
</tr>
<tr>
<td class="name"><code>reverse</code></td>
<td class="type">
<span class="param-type"><a href="boolean.html">boolean</a></span>
</td>
<td class="description last">specify if you want reverse cycle</td>
</tr>
</tbody>
</table>
<h4 class="name" id="timesReverse"><span class="type-signature"></span>timesReverse<span class="signature">(times, iteratee)</span><span class="type-signature"></span></h4>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Extensions_lodash.js.html">Extensions/lodash.js</a>, <a href="Extensions_lodash.js.html#line319">line 319</a>
</li></ul></dd>
</dl>
<div class="description">
a reverse implementation of _.times by lodash<br><br>
</div>
<h5>Example</h5>
<p class="code-caption">eg. usage</p>
<pre class="prettyprint"><code>_.timesReverse(5, function(i) {
console.log(i);
});
// logs
5
4
3
2
1</code></pre>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>times</code></td>
<td class="type">
<span class="param-type"><a href="number.html">number</a></span>
</td>
<td class="description last">num of times to invoke iteratee</td>
</tr>
<tr>
<td class="name"><code>iteratee</code></td>
<td class="type">
<span class="param-type"><a href="function.html">function</a></span>
</td>
<td class="description last">the iteratee function to invoke<br>
the iteratee will be invoked passing che cycle indicator as i<br>
so the iteratee has to be something like this<br>
<pre>
function(i) {}
</pre></td>
</tr>
</tbody>
</table>
</article>
</section>
</div>
<br class="clear">
<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.2</a> on Fri Jun 14 2019 15:20:48 GMT+0200 (CEST) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
</footer>
<script>prettyPrint();</script>
<script src="scripts/linenumber.js"></script>
</body>
</html>