Skip to content

Commit

Permalink
📝 Update documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
riboher committed Nov 12, 2018
1 parent ac3efc1 commit e8cbadb
Show file tree
Hide file tree
Showing 12 changed files with 322 additions and 18 deletions.
2 changes: 1 addition & 1 deletion docs/constants.js.html
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ <h3 class="reference-title">
Geoblink Lodash Mixins
</h3>

<h3 id="global-nav">Global</h3><ul><li><a href="global.html#SORTING_ORDER">SORTING_ORDER</a></li><li><a href="global.html#fromPairsMap">fromPairsMap</a></li><li><a href="global.html#getTruthyKeys">getTruthyKeys</a></li><li><a href="global.html#hasTruthyValues">hasTruthyValues</a></li><li><a href="global.html#mGet">mGet</a></li><li><a href="global.html#mapNonNil">mapNonNil</a></li><li><a href="global.html#mergeForEach">mergeForEach</a></li><li><a href="global.html#shortcuttedReduce">shortcuttedReduce</a></li></ul>
<h3 id="global-nav">Global</h3><ul><li><a href="global.html#SORTING_ORDER">SORTING_ORDER</a></li><li><a href="global.html#fromPairsMap">fromPairsMap</a></li><li><a href="global.html#fromPairsMapNonNil">fromPairsMapNonNil</a></li><li><a href="global.html#getTruthyKeys">getTruthyKeys</a></li><li><a href="global.html#hasTruthyValues">hasTruthyValues</a></li><li><a href="global.html#mGet">mGet</a></li><li><a href="global.html#mapNonNil">mapNonNil</a></li><li><a href="global.html#mergeForEach">mergeForEach</a></li><li><a href="global.html#shortcuttedReduce">shortcuttedReduce</a></li></ul>
</nav>

<div id="main">
Expand Down
2 changes: 1 addition & 1 deletion docs/fromPairsMap.js.html
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ <h3 class="reference-title">
Geoblink Lodash Mixins
</h3>

<h3 id="global-nav">Global</h3><ul><li><a href="global.html#SORTING_ORDER">SORTING_ORDER</a></li><li><a href="global.html#fromPairsMap">fromPairsMap</a></li><li><a href="global.html#getTruthyKeys">getTruthyKeys</a></li><li><a href="global.html#hasTruthyValues">hasTruthyValues</a></li><li><a href="global.html#mGet">mGet</a></li><li><a href="global.html#mapNonNil">mapNonNil</a></li><li><a href="global.html#mergeForEach">mergeForEach</a></li><li><a href="global.html#shortcuttedReduce">shortcuttedReduce</a></li></ul>
<h3 id="global-nav">Global</h3><ul><li><a href="global.html#SORTING_ORDER">SORTING_ORDER</a></li><li><a href="global.html#fromPairsMap">fromPairsMap</a></li><li><a href="global.html#fromPairsMapNonNil">fromPairsMapNonNil</a></li><li><a href="global.html#getTruthyKeys">getTruthyKeys</a></li><li><a href="global.html#hasTruthyValues">hasTruthyValues</a></li><li><a href="global.html#mGet">mGet</a></li><li><a href="global.html#mapNonNil">mapNonNil</a></li><li><a href="global.html#mergeForEach">mergeForEach</a></li><li><a href="global.html#shortcuttedReduce">shortcuttedReduce</a></li></ul>
</nav>

<div id="main">
Expand Down
126 changes: 126 additions & 0 deletions docs/fromPairsMapNonNil.js.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@


<!DOCTYPE html>
<html lang="en">
<head>

<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">

<title>
fromPairsMapNonNil.js - Documentation
</title>

<link href="https://www.braintreepayments.com/images/favicon-ccda0b14.png" rel="icon" type="image/png">

<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.7.0/highlight.min.js"></script>
<script>hljs.initHighlightingOnLoad();</script>

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.0/jquery.min.js"></script>

<link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
<link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">



<!-- start Mixpanel -->
<script type="text/javascript">(function(e,a){if(!a.__SV){var b=window;try{var c,l,i,j=b.location,g=j.hash;c=function(a,b){return(l=a.match(RegExp(b+"=([^&]*)")))?l[1]:null};g&&c(g,"state")&&(i=JSON.parse(decodeURIComponent(c(g,"state"))),"mpeditor"===i.action&&(b.sessionStorage.setItem("_mpcehash",g),history.replaceState(i.desiredHash||"",e.title,j.pathname+j.search)))}catch(m){}var k,h;window.mixpanel=a;a._i=[];a.init=function(b,c,f){function e(b,a){var c=a.split(".");2==c.length&&(b=b[c[0]],a=c[1]);b[a]=function(){b.push([a].concat(Array.prototype.slice.call(arguments,
0)))}}var d=a;"undefined"!==typeof f?d=a[f]=[]:f="mixpanel";d.people=d.people||[];d.toString=function(b){var a="mixpanel";"mixpanel"!==f&&(a+="."+f);b||(a+=" (stub)");return a};d.people.toString=function(){return d.toString(1)+".people (stub)"};k="disable time_event track track_pageview track_links track_forms register register_once alias unregister identify name_tag set_config reset people.set people.set_once people.increment people.append people.union people.track_charge people.clear_charges people.delete_user".split(" ");
for(h=0;h<k.length;h++)e(d,k[h]);a._i.push([b,c,f])};a.__SV=1.2;b=e.createElement("script");b.type="text/javascript";b.async=!0;b.src="undefined"!==typeof MIXPANEL_CUSTOM_LIB_URL?MIXPANEL_CUSTOM_LIB_URL:"file:"===e.location.protocol&&"//cdn.mxpnl.com/libs/mixpanel-2-latest.min.js".match(/^\/\//)?"https://cdn.mxpnl.com/libs/mixpanel-2-latest.min.js":"//cdn.mxpnl.com/libs/mixpanel-2-latest.min.js";c=e.getElementsByTagName("script")[0];c.parentNode.insertBefore(b,c)}})(document,window.mixpanel||[]);
mixpanel.init("1919205b2da72e4da3b9b6639b444d59");</script>
<!-- end Mixpanel -->
</head>

<body>
<svg style="display: none;">
<defs>
<symbol id="linkIcon" fill="#706d77" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg">
<path d="M0 0h24v24H0z" fill="none"/>
<path d="M3.9 12c0-1.71 1.39-3.1 3.1-3.1h4V7H7c-2.76 0-5 2.24-5 5s2.24 5 5 5h4v-1.9H7c-1.71 0-3.1-1.39-3.1-3.1zM8 13h8v-2H8v2zm9-6h-4v1.9h4c1.71 0 3.1 1.39 3.1 3.1s-1.39 3.1-3.1 3.1h-4V17h4c2.76 0 5-2.24 5-5s-2.24-5-5-5z"/>
</symbol>
</defs>
</svg>

<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 class="top-nav-wrapper">
<ul>
<li >
<a href="index.html">

<svg fill="#6D6D6D" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg">
<path d="M10 20v-6h4v6h5v-8h3L12 3 2 12h3v8z"/>
<path d="M0 0h24v24H0z" fill="none"/>
</svg>


</a>
</li>



</ul>
</div>

<nav>
<h3 class="reference-title">
Geoblink Lodash Mixins
</h3>

<h3 id="global-nav">Global</h3><ul><li><a href="global.html#SORTING_ORDER">SORTING_ORDER</a></li><li><a href="global.html#fromPairsMap">fromPairsMap</a></li><li><a href="global.html#fromPairsMapNonNil">fromPairsMapNonNil</a></li><li><a href="global.html#getTruthyKeys">getTruthyKeys</a></li><li><a href="global.html#hasTruthyValues">hasTruthyValues</a></li><li><a href="global.html#mGet">mGet</a></li><li><a href="global.html#mapNonNil">mapNonNil</a></li><li><a href="global.html#mergeForEach">mergeForEach</a></li><li><a href="global.html#shortcuttedReduce">shortcuttedReduce</a></li></ul>
</nav>

<div id="main">

<h1 class="page-title">
fromPairsMapNonNil.js
</h1>





<section>
<article>
<pre class="prettyprint source linenums"><code>const _ = require('lodash')
const mapNonNil = require('../src/mapNonNil')
module.exports = fromPairsMapNonNil

/**
* Applies `fromPairs` to the result of mapping and filtering `nil` values given `iteratee` to given
* collection.
*
* @param {Array|Object} collection Collection to iterate over
* @param {Function} iteratee Function invoked per iteration
* @returns {Object} New object
*/
function fromPairsMapNonNil (collection, iteratee) {
return _.fromPairs(mapNonNil(collection, iteratee))
}
</code></pre>
</article>
</section>




</div>

<br class="clear">

<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a>
</footer>

<script src="scripts/linenumber.js"></script>
<script src="scripts/pagelocation.js"></script>



</body>
</html>
2 changes: 1 addition & 1 deletion docs/getTruthyKeys.js.html
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ <h3 class="reference-title">
Geoblink Lodash Mixins
</h3>

<h3 id="global-nav">Global</h3><ul><li><a href="global.html#SORTING_ORDER">SORTING_ORDER</a></li><li><a href="global.html#fromPairsMap">fromPairsMap</a></li><li><a href="global.html#getTruthyKeys">getTruthyKeys</a></li><li><a href="global.html#hasTruthyValues">hasTruthyValues</a></li><li><a href="global.html#mGet">mGet</a></li><li><a href="global.html#mapNonNil">mapNonNil</a></li><li><a href="global.html#mergeForEach">mergeForEach</a></li><li><a href="global.html#shortcuttedReduce">shortcuttedReduce</a></li></ul>
<h3 id="global-nav">Global</h3><ul><li><a href="global.html#SORTING_ORDER">SORTING_ORDER</a></li><li><a href="global.html#fromPairsMap">fromPairsMap</a></li><li><a href="global.html#fromPairsMapNonNil">fromPairsMapNonNil</a></li><li><a href="global.html#getTruthyKeys">getTruthyKeys</a></li><li><a href="global.html#hasTruthyValues">hasTruthyValues</a></li><li><a href="global.html#mGet">mGet</a></li><li><a href="global.html#mapNonNil">mapNonNil</a></li><li><a href="global.html#mergeForEach">mergeForEach</a></li><li><a href="global.html#shortcuttedReduce">shortcuttedReduce</a></li></ul>
</nav>

<div id="main">
Expand Down
184 changes: 183 additions & 1 deletion docs/global.html
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ <h3 class="reference-title">
Geoblink Lodash Mixins
</h3>

<h3 id="global-nav">Global</h3><ul><li><a href="global.html#SORTING_ORDER">SORTING_ORDER</a></li><li><a href="global.html#fromPairsMap">fromPairsMap</a></li><li><a href="global.html#getTruthyKeys">getTruthyKeys</a></li><li><a href="global.html#hasTruthyValues">hasTruthyValues</a></li><li><a href="global.html#mGet">mGet</a></li><li><a href="global.html#mapNonNil">mapNonNil</a></li><li><a href="global.html#mergeForEach">mergeForEach</a></li><li><a href="global.html#shortcuttedReduce">shortcuttedReduce</a></li></ul>
<h3 id="global-nav">Global</h3><ul><li><a href="global.html#SORTING_ORDER">SORTING_ORDER</a></li><li><a href="global.html#fromPairsMap">fromPairsMap</a></li><li><a href="global.html#fromPairsMapNonNil">fromPairsMapNonNil</a></li><li><a href="global.html#getTruthyKeys">getTruthyKeys</a></li><li><a href="global.html#hasTruthyValues">hasTruthyValues</a></li><li><a href="global.html#mGet">mGet</a></li><li><a href="global.html#mapNonNil">mapNonNil</a></li><li><a href="global.html#mergeForEach">mergeForEach</a></li><li><a href="global.html#shortcuttedReduce">shortcuttedReduce</a></li></ul>
</nav>

<div id="main">
Expand Down Expand Up @@ -532,6 +532,188 @@ <h5>Parameters:</h5>



<span class='name-container'>
<a class="link-icon" href="#fromPairsMapNonNil">
<svg height="20" width="20" style="fill: black;">
<use xlink:href="#linkIcon"></use>
</svg>
</a>
<h4 class="name" id="fromPairsMapNonNil">
<span class="type-signature"></span>fromPairsMapNonNil<span class="signature">(collection, iteratee)</span><span class="type-signature"> &rarr; {Object}</span>
</h4>
</span>





<div class="description">
Applies `fromPairs` to the result of mapping and filtering `nil` values given `iteratee` to given
collection.
</div>







<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">
Object
</span>





</td>





<td class="description last">
Collection to iterate over

</td>
</tr>


<tr>

<td class="name"><code>iteratee</code></td>


<td class="type">


<span class="param-type">
function
</span>





</td>





<td class="description last">
Function invoked per iteration

</td>
</tr>


</tbody>
</table>





<dl class="details">


























<dt class="tag-source">Source:</dt>
<dd class="tag-source">
<ul class="dummy">
<li>
<a href="fromPairsMapNonNil.js.html">fromPairsMapNonNil.js</a>, <a href="fromPairsMapNonNil.js.html#line13">line 13</a>
</li>
</ul>
</dd>







</dl>




















<span class='name-container'>
<a class="link-icon" href="#getTruthyKeys">
<svg height="20" width="20" style="fill: black;">
Expand Down
2 changes: 1 addition & 1 deletion docs/hasTruthyValues.js.html
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ <h3 class="reference-title">
Geoblink Lodash Mixins
</h3>

<h3 id="global-nav">Global</h3><ul><li><a href="global.html#SORTING_ORDER">SORTING_ORDER</a></li><li><a href="global.html#fromPairsMap">fromPairsMap</a></li><li><a href="global.html#getTruthyKeys">getTruthyKeys</a></li><li><a href="global.html#hasTruthyValues">hasTruthyValues</a></li><li><a href="global.html#mGet">mGet</a></li><li><a href="global.html#mapNonNil">mapNonNil</a></li><li><a href="global.html#mergeForEach">mergeForEach</a></li><li><a href="global.html#shortcuttedReduce">shortcuttedReduce</a></li></ul>
<h3 id="global-nav">Global</h3><ul><li><a href="global.html#SORTING_ORDER">SORTING_ORDER</a></li><li><a href="global.html#fromPairsMap">fromPairsMap</a></li><li><a href="global.html#fromPairsMapNonNil">fromPairsMapNonNil</a></li><li><a href="global.html#getTruthyKeys">getTruthyKeys</a></li><li><a href="global.html#hasTruthyValues">hasTruthyValues</a></li><li><a href="global.html#mGet">mGet</a></li><li><a href="global.html#mapNonNil">mapNonNil</a></li><li><a href="global.html#mergeForEach">mergeForEach</a></li><li><a href="global.html#shortcuttedReduce">shortcuttedReduce</a></li></ul>
</nav>

<div id="main">
Expand Down
12 changes: 4 additions & 8 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ <h3 class="reference-title">
Geoblink Lodash Mixins
</h3>

<h3 id="global-nav">Global</h3><ul><li><a href="global.html#SORTING_ORDER">SORTING_ORDER</a></li><li><a href="global.html#fromPairsMap">fromPairsMap</a></li><li><a href="global.html#getTruthyKeys">getTruthyKeys</a></li><li><a href="global.html#hasTruthyValues">hasTruthyValues</a></li><li><a href="global.html#mGet">mGet</a></li><li><a href="global.html#mapNonNil">mapNonNil</a></li><li><a href="global.html#mergeForEach">mergeForEach</a></li><li><a href="global.html#shortcuttedReduce">shortcuttedReduce</a></li></ul>
<h3 id="global-nav">Global</h3><ul><li><a href="global.html#SORTING_ORDER">SORTING_ORDER</a></li><li><a href="global.html#fromPairsMap">fromPairsMap</a></li><li><a href="global.html#fromPairsMapNonNil">fromPairsMapNonNil</a></li><li><a href="global.html#getTruthyKeys">getTruthyKeys</a></li><li><a href="global.html#hasTruthyValues">hasTruthyValues</a></li><li><a href="global.html#mGet">mGet</a></li><li><a href="global.html#mapNonNil">mapNonNil</a></li><li><a href="global.html#mergeForEach">mergeForEach</a></li><li><a href="global.html#shortcuttedReduce">shortcuttedReduce</a></li></ul>
</nav>

<div id="main">
Expand All @@ -92,18 +92,14 @@ <h3 id="global-nav">Global</h3><ul><li><a href="global.html#SORTING_ORDER">SORTI
<a href="https://travis-ci.org/geoblink/lodash-mixins"><img src="https://travis-ci.org/geoblink/lodash-mixins.svg?branch=master" alt="Build Status"></a>
<a href="https://coveralls.io/github/geoblink/lodash-mixins"><img src="https://coveralls.io/repos/github/geoblink/lodash-mixins/badge.svg" alt="Coverage Status"></a>
<img src="https://img.shields.io/bundlephobia/min/@geoblink/lodash-mixins.svg" alt="npm bundle size (minified)">
<img src="https://img.shields.io/npm/v/@geoblink/lodash-mixins.svg" alt="npm"></p>
<a href="https://www.npmjs.com/package/@geoblink/lodash-mixins"><img src="https://img.shields.io/npm/v/@geoblink/lodash-mixins.svg" alt="npm"></a>
<a href="https://geoblink.github.io/lodash-mixins/"><img src="https://img.shields.io/badge/docs-automated-blue.svg" alt="docs"></a></p>
<h1>@geoblink/lodash-mixins</h1><p>A collection of functionalities to extend lodash library.</p>
<h2>Installation</h2><p>Using NPM:</p>
<pre class="prettyprint source lang-bash"><code>npm i --save @geoblink/lodash-mixins</code></pre><p>Or yarn:</p>
<pre class="prettyprint source lang-bash"><code>yarn add --save @geoblink/lodash-mixins</code></pre><h2>Usage</h2><p>In your app:</p>
<pre class="prettyprint source lang-javascript"><code>const _ = require('lodash')
require('@geoblink/lodash-mixins')(_)</code></pre><h2>API</h2><h3>fromPairsMap</h3><p><code>fromPairsMap (collection, iteratee)</code> Applies fromPairs to the result of mapping the given iteratee to the given array.</p>
<h3>getTruthyKeys</h3><p><code>function getTruthyKeys (collection, parseKeyFunction)</code> Returns the truthy values of the collection. If <code>parseKeyFunction</code> is provided, the values will be parsed against it.</p>
<h3>hasTruthyValues</h3><p><code>function hasTruthyValues (object)</code> Returns whether given object has at least one truthy value for one of its keys.</p>
<h3>mapNonNil</h3><p><code>function mapNonNil (collection, iteratee)</code> Returns a new collection with non-nil values.</p>
<h3>mGet</h3><p><code>function mGet (object, arrayOfKeys, defaultValue)</code> Returns a new array with the values of <code>object</code> that match <code>arrayOfKeys</code></p>
<h3>shortcuttedReduce</h3><p><code>function shortcuttedReduce (collection, iteratee, accumulator)</code> Like _.reduce but as soon as accumulator changes it finishes execution.</p>
require('@geoblink/lodash-mixins')(_)</code></pre><h2>Docs</h2><p>Documentation is automatically updated whenever a new version is released and can be checked in <a href="https://geoblink.github.io/lodash-mixins">https://geoblink.github.io/lodash-mixins</a>.</p>
</article>
</section>

Expand Down

0 comments on commit e8cbadb

Please sign in to comment.