Skip to content

Commit 78217e2

Browse files
committed
docs(generate): update jsdoc/docdash generated documentation
1 parent 500dd95 commit 78217e2

39 files changed

+549
-582
lines changed

docs/$ecomConfig.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -482,7 +482,7 @@ <h5>Parameters:</h5>
482482
<br class="clear">
483483

484484
<footer>
485-
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.4</a> on Fri May 22 2020 15:55:38 GMT-0300 (Brasilia Standard Time) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
485+
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.11</a> on Wed Nov 09 2022 17:04:17 GMT-0300 (Brasilia Standard Time) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
486486
</footer>
487487

488488
<script>prettyPrint();</script>

docs/ecom-utils.js.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ <h1 class="page-title">ecom-utils.js</h1>
145145
<br class="clear">
146146

147147
<footer>
148-
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.4</a> on Fri May 22 2020 15:55:38 GMT-0300 (Brasilia Standard Time) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
148+
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.11</a> on Wed Nov 09 2022 17:04:17 GMT-0300 (Brasilia Standard Time) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
149149
</footer>
150150

151151
<script>prettyPrint();</script>

docs/ecomUtils.html

Lines changed: 37 additions & 34 deletions
Large diffs are not rendered by default.

docs/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ <h3>Deploy</h3>
111111
<br class="clear">
112112

113113
<footer>
114-
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.4</a> on Fri May 22 2020 15:55:38 GMT-0300 (Brasilia Standard Time) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
114+
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.11</a> on Wed Nov 09 2022 17:04:17 GMT-0300 (Brasilia Standard Time) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
115115
</footer>
116116

117117
<script>prettyPrint();</script>

docs/index.js.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ <h1 class="page-title">index.js</h1>
117117
<br class="clear">
118118

119119
<footer>
120-
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.4</a> on Fri May 22 2020 15:55:38 GMT-0300 (Brasilia Standard Time) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
120+
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.11</a> on Wed Nov 09 2022 17:04:17 GMT-0300 (Brasilia Standard Time) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
121121
</footer>
122122

123123
<script>prettyPrint();</script>

docs/lib_config.js.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ <h1 class="page-title">lib/config.js</h1>
185185
<br class="clear">
186186

187187
<footer>
188-
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.4</a> on Fri May 22 2020 15:55:38 GMT-0300 (Brasilia Standard Time) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
188+
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.11</a> on Wed Nov 09 2022 17:04:17 GMT-0300 (Brasilia Standard Time) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
189189
</footer>
190190

191191
<script>prettyPrint();</script>

docs/methods_alphabetical-sort.js.html

Lines changed: 25 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,30 @@ <h1 class="page-title">methods/alphabetical-sort.js</h1>
4242

4343
<section>
4444
<article>
45-
<pre class="prettyprint source linenums"><code>const alphabeticalSort = list => {
45+
<pre class="prettyprint source linenums"><code>/**
46+
* @method
47+
* @memberof ecomUtils
48+
* @name alphabeticalSort
49+
* @description Sort list of objects alphabetically by name ot title property.
50+
* @param {array|object} list - Array of objects (products, brands...) or list body with 'results'
51+
* @returns {array}
52+
*
53+
* @example
54+
* // Sample array with name or title's property
55+
* ecomUtils.alphabeticalSort(['product', 'category'])
56+
* // => ["category", "product"]
57+
* ecomUtils.alphabeticalSort(['Matheus', 'Vitor', 'Ana', 'Clara', 'Bruna'])
58+
* // => ["Ana", "Bruna", "Clara", "Matheus", "Vitor"]
59+
* // Can be an array of objects like:
60+
* const brand1 = {name: 'zara'}
61+
* const brand2 = {name: 'Thermaltake'}
62+
* const brand3 = {name: 'AeroCool'}
63+
* const brand4 = {name: 'Fortrek'}
64+
* const array = [brand1, brand2, brand3, brand4]
65+
* ecomUtils.alphabeticalSort(array)
66+
* // => [{name: "AeroCool"}, {name: "Fortrek"}, {name: "Thermaltake"}, {name: "Thermaltake"}, {name: "zara"}]
67+
*/
68+
const alphabeticalSort = list => {
4669
if (Array.isArray(list)) {
4770
// try to sort by name or title
4871
return list.sort((a, b) => {
@@ -69,30 +92,6 @@ <h1 class="page-title">methods/alphabetical-sort.js</h1>
6992
return []
7093
}
7194

72-
/**
73-
* @method
74-
* @memberof ecomUtils
75-
* @name alphabeticalSort
76-
* @description Sort list of objects alphabetically by name ot title property.
77-
* @param {array|object} list - Array of objects (products, brands...) or list body with 'results'
78-
* @returns {array}
79-
*
80-
* @example
81-
* // Sample array with name or title's property
82-
* ecomUtils.alphabeticalSort(['product', 'category'])
83-
* // => ["category", "product"]
84-
* ecomUtils.alphabeticalSort(['Matheus', 'Vitor', 'Ana', 'Clara', 'Bruna'])
85-
* // => ["Ana", "Bruna", "Clara", "Matheus", "Vitor"]
86-
* // Can be an array of objects like:
87-
* const brand1 = {name: 'zara'}
88-
* const brand2 = {name: 'Thermaltake'}
89-
* const brand3 = {name: 'AeroCool'}
90-
* const brand4 = {name: 'Fortrek'}
91-
* const array = [brand1, brand2, brand3, brand4]
92-
* ecomUtils.alphabeticalSort(array)
93-
* // => [{name: "AeroCool"}, {name: "Fortrek"}, {name: "Thermaltake"}, {name: "Thermaltake"}, {name: "zara"}]
94-
*/
95-
9695
export default alphabeticalSort
9796
</code></pre>
9897
</article>
@@ -108,7 +107,7 @@ <h1 class="page-title">methods/alphabetical-sort.js</h1>
108107
<br class="clear">
109108

110109
<footer>
111-
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.4</a> on Fri May 22 2020 15:55:38 GMT-0300 (Brasilia Standard Time) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
110+
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.11</a> on Wed Nov 09 2022 17:04:17 GMT-0300 (Brasilia Standard Time) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
112111
</footer>
113112

114113
<script>prettyPrint();</script>

docs/methods_birth-date.js.html

Lines changed: 16 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -44,22 +44,6 @@ <h1 class="page-title">methods/birth-date.js</h1>
4444
<article>
4545
<pre class="prettyprint source linenums"><code>import formatDate from './format-date'
4646

47-
const birthDate = customer => {
48-
if (typeof customer === 'object' &amp;&amp; customer !== null) {
49-
let birth = customer.birth_date || customer
50-
if (birth) {
51-
let { day, month, year } = birth
52-
if (day &amp;&amp; month &amp;&amp; year) {
53-
// has complete customer birth date
54-
// mount Date object and return formatted date string
55-
return formatDate(new Date(year, month - 1, day))
56-
}
57-
}
58-
}
59-
// returns empty string by default
60-
return ''
61-
}
62-
6347
/**
6448
* @method
6549
* @memberof ecomUtils
@@ -76,6 +60,21 @@ <h1 class="page-title">methods/birth-date.js</h1>
7660
* ecomUtils.birthDate(costumer)
7761
* // => "10/1/1990"
7862
*/
63+
const birthDate = customer => {
64+
if (typeof customer === 'object' &amp;&amp; customer !== null) {
65+
let birth = customer.birth_date || customer
66+
if (birth) {
67+
let { day, month, year } = birth
68+
if (day &amp;&amp; month &amp;&amp; year) {
69+
// has complete customer birth date
70+
// mount Date object and return formatted date string
71+
return formatDate(new Date(year, month - 1, day))
72+
}
73+
}
74+
}
75+
// returns empty string by default
76+
return ''
77+
}
7978

8079
export default birthDate
8180
</code></pre>
@@ -92,7 +91,7 @@ <h1 class="page-title">methods/birth-date.js</h1>
9291
<br class="clear">
9392

9493
<footer>
95-
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.4</a> on Fri May 22 2020 15:55:38 GMT-0300 (Brasilia Standard Time) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
94+
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.11</a> on Wed Nov 09 2022 17:04:17 GMT-0300 (Brasilia Standard Time) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
9695
</footer>
9796

9897
<script>prettyPrint();</script>

docs/methods_categories-list.js.html

Lines changed: 21 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,26 @@ <h1 class="page-title">methods/categories-list.js</h1>
4242

4343
<section>
4444
<article>
45-
<pre class="prettyprint source linenums"><code>const categoriesList = product => {
45+
<pre class="prettyprint source linenums"><code>/**
46+
* @method
47+
* @memberof ecomUtils
48+
* @name categoriesList
49+
* @description Parse category tree string to list of categories names.
50+
* @param {object|string} product - Product object body or category tree string
51+
* @returns {array}
52+
*
53+
* @example
54+
* // Can be a category tree, like:
55+
* const categoryTree = 'Quarto > Cama > Travesseiros'
56+
* // So use categoryTree is parameter of function categoriesList, like:
57+
* ecomUtils.categoriesList(categoryTree)
58+
* // => ["Quarto", "Cama", "Travesseiros"]
59+
* // Or can be a product body object like:
60+
* const product = { name: 'Ultimate', categories: [{name: 'Cadeira Gamer'},{name: 'Periféricos'}]}
61+
* ecomUtils.categoriesList(product)
62+
* => ["Cadeira Gamer"]
63+
*/
64+
const categoriesList = product => {
4665
let categoryTree
4766
if (typeof product === 'object' &amp;&amp; product !== null) {
4867
// try to get categories from product body object
@@ -70,26 +89,6 @@ <h1 class="page-title">methods/categories-list.js</h1>
7089
return []
7190
}
7291

73-
/**
74-
* @method
75-
* @memberof ecomUtils
76-
* @name categoriesList
77-
* @description Parse category tree string to list of categories names.
78-
* @param {object|string} product - Product object body or category tree string
79-
* @returns {array}
80-
*
81-
* @example
82-
* // Can be a category tree, like:
83-
* const categoryTree = 'Quarto > Cama > Travesseiros'
84-
* // So use categoryTree is parameter of function categoriesList, like:
85-
* ecomUtils.categoriesList(categoryTree)
86-
* // => ["Quarto", "Cama", "Travesseiros"]
87-
* // Or can be a product body object like:
88-
* const product = { name: 'Ultimate', categories: [{name: 'Cadeira Gamer'},{name: 'Periféricos'}]}
89-
* ecomUtils.categoriesList(product)
90-
* => ["Cadeira Gamer"]
91-
*/
92-
9392
export default categoriesList
9493
</code></pre>
9594
</article>
@@ -105,7 +104,7 @@ <h1 class="page-title">methods/categories-list.js</h1>
105104
<br class="clear">
106105

107106
<footer>
108-
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.4</a> on Fri May 22 2020 15:55:38 GMT-0300 (Brasilia Standard Time) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
107+
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.11</a> on Wed Nov 09 2022 17:04:17 GMT-0300 (Brasilia Standard Time) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
109108
</footer>
110109

111110
<script>prettyPrint();</script>

docs/methods_filter-by-parent-slug.js.html

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -42,19 +42,7 @@ <h1 class="page-title">methods/filter-by-parent-slug.js</h1>
4242

4343
<section>
4444
<article>
45-
<pre class="prettyprint source linenums"><code>const filterByParentSlug = (categories, slug) => {
46-
// for categories
47-
// returns array of macthed category objects
48-
try {
49-
return categories.filter(category => category.parent &amp;&amp; category.parent.slug === slug)
50-
} catch (err) {
51-
// not an array ?
52-
console.error(err)
53-
return []
54-
}
55-
}
56-
57-
/**
45+
<pre class="prettyprint source linenums"><code>/**
5846
* @method
5947
* @memberof ecomUtils
6048
* @name filterByParentSlug
@@ -72,6 +60,17 @@ <h1 class="page-title">methods/filter-by-parent-slug.js</h1>
7260
* ecomUtils.filterByParentSlug(categories, 'info')
7361
* // => [ { name: 'PCs', slug: 'pcs', parent: { name: 'Info', slug: 'info' } } ]
7462
*/
63+
const filterByParentSlug = (categories, slug) => {
64+
// for categories
65+
// returns array of macthed category objects
66+
try {
67+
return categories.filter(category => category.parent &amp;&amp; category.parent.slug === slug)
68+
} catch (err) {
69+
// not an array ?
70+
console.error(err)
71+
return []
72+
}
73+
}
7574

7675
export default filterByParentSlug
7776
</code></pre>
@@ -88,7 +87,7 @@ <h1 class="page-title">methods/filter-by-parent-slug.js</h1>
8887
<br class="clear">
8988

9089
<footer>
91-
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.4</a> on Fri May 22 2020 15:55:38 GMT-0300 (Brasilia Standard Time) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
90+
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.11</a> on Wed Nov 09 2022 17:04:17 GMT-0300 (Brasilia Standard Time) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
9291
</footer>
9392

9493
<script>prettyPrint();</script>

0 commit comments

Comments
 (0)