./base/functions/generic.js: commenting some funcs
diff --git a/js/base/functions/generic.js b/js/base/functions/generic.js
index 6d363a894cc4..796af9bbc07f 100644
--- a/js/base/functions/generic.js
+++ b/js/base/functions/generic.js
@@ -29,32 +29,70 @@ module.exports =
     , extend
     , clone
     , index
-    , ordered: x => x // a stub to keep assoc keys in order (in JS it does nothing, it's mostly for Python)   
+    , ordered: x => x // a stub to keep assoc keys in order (in JS it does nothing, it's mostly for Python)
     , unique:  x => Array.from (index (x))
-    
+
 /*  .............................................   */
 
     , keysort (x, out = {}) {
-        
+
         for (const k of keys (x).sort ())
             out[k] = x[k]
-        
+
         return out
     }
 
 /*  .............................................   */
 
+    /*
+       Accepts a map/array of objects and a key name to be used as an index:
+       array = [
+          { someKey: 'value1', anotherKey: 'anotherValue1' },
+          { someKey: 'value2', anotherKey: 'anotherValue2' },
+          { someKey: 'value3', anotherKey: 'anotherValue3' },
+       ]
+       key = 'someKey'
+
+       Returns a map:
+      {
+          value1: { someKey: 'value1', anotherKey: 'anotherValue1' },
+          value2: { someKey: 'value2', anotherKey: 'anotherValue2' },
+          value3: { someKey: 'value3', anotherKey: 'anotherValue3' },
+      }
+    */
+
     , indexBy (x, k, out = {}) {
 
         for (const v of values (x))
             if (k in v)
                 out[v[k]] = v
-    
+
         return out
     }
 
 /*  .............................................   */
 
+    /*
+       Accepts a map/array of objects and a key name to be used as a grouping parameter:
+       array = [
+          { someKey: 'value1', anotherKey: 'anotherValue1' },
+          { someKey: 'value1', anotherKey: 'anotherValue2' },
+          { someKey: 'value3', anotherKey: 'anotherValue3' },
+       ]
+       key = 'someKey'
+
+       Returns a map:
+      {
+          value1: [
+            { someKey: 'value1', anotherKey: 'anotherValue1' },
+            { someKey: 'value1', anotherKey: 'anotherValue2' },
+          ]
+          value3: [
+            { someKey: 'value3', anotherKey: 'anotherValue3' }
+          ],
+      }
+    */
+
     , groupBy (x, k, out = {}) {
 
         for (const v of values (x)) {
@@ -69,12 +107,28 @@ module.exports =
 
 /*  .............................................   */
 
+    /*
+       Accepts a map/array of objects, a key name and a key value to be used as a filter:
+       array = [
+          { someKey: 'value1', anotherKey: 'anotherValue1' },
+          { someKey: 'value2', anotherKey: 'anotherValue2' },
+          { someKey: 'value3', anotherKey: 'anotherValue3' },
+       ]
+       key = 'someKey'
+       value = 'value1'
+
+       Returns an array:
+      [
+          value1: { someKey: 'value1', anotherKey: 'anotherValue1' },
+      ]
+    */
+
     , filterBy (x, k, value = undefined, out = []) {
 
         for (const v of values (x))
             if (v[k] === value)
                 out.push (v)
-    
+
         return out
     }
 
@@ -95,7 +149,7 @@ module.exports =
             if (isArray (v)) flatten (v, out)
             else out.push (v)
         }
-    
+
         return out
     }
 
@@ -110,16 +164,16 @@ module.exports =
     , omit (x, ...args) {
 
         const out = clone (x)
-    
+
         for (const k of args) {
-    
+
             if (isArray (k)) // omit (x, ['a', 'b'])
                 for (const kk of k)
                     delete out[kk]
 
             else delete out[k] // omit (x, 'a', 'b')
         }
-        
+
         return out
     }
 
@@ -128,7 +182,7 @@ module.exports =
     , sum (...xs) {
 
         const ns = xs.filter (isNumber) // leave only numbers
-    
+
         return (ns.length > 0)
                     ? ns.reduce ((a, b) => a + b, 0)
                     : undefined
