docs: function (filter, content) {
          if ( typeof(filter) != 'object') {
              throw new Error('`filter` parametter must be an object or an array')
          }
  
          var condition           = filter.count()
              , sortOp            = {}
              , key               = null
              , prop              = null
              , result            = []
              ;
  
          if (condition == 0) return null;
  
  
          // asc
          sortOp['asc'] = function (prop, content) {
              return content.sort(function onAscSort(a, b) {
  
                  if ( typeof(a) == 'string' && a != '') {
                      // var fieldA = a.toUpperCase(); // ignore upper and lowercase
                      // var fieldB = b.toUpperCase(); // ignore upper and lowercase
                      //
                      // if (fieldA < fieldB) {
                      //     return -1;
                      // }
                      //
                      // if (fieldA > fieldB) {
                      //     return 1;
                      // }
                      //
                      // // fields must be equal
                      // return 0;
  
                      return a.localeCompare(b)
  
                  } else if ( typeof(a) == 'boolean' || typeof(b) == 'boolean' ) {
  
                      if (typeof(a) == 'boolean' ) {
                          a = (a) ? 1: 0;
                      }
                      if (typeof(b) == 'boolean' ) {
                          b = (b) ? 1: 0;
                      }
  
                      if (a > b) {
                          return 1;
                      }
                      if (a < b) {
                          return -1;
                      }
  
                      // a must be equal to b
                      return 0;
  
                  } else if ( typeof(a) == 'object' ) {
                      try {
                          if ( typeof(a[prop]) == 'number' ) {
  
                              a[prop] = '' + a[prop];
                              b[prop] = '' + b[prop];
                          }
  
                          return a[prop].localeCompare(b[prop], { numeric: true})
  
                      } catch (err) {
                          return -1
                      }
  
                  } else {
                      if (a > b) {
                          return 1;
                      }
                      if (a < b) {
                          return -1;
                      }
                      // a must be equal to b
                      return 0;
                  }
              })
          }
  
          // desc
          sortOp['desc'] = function (prop, content) {
              return sortOp['asc'](prop, content).reverse()
          }
  
          if ( Array.isArray(filter) ) {
  
              for (var f = 0, len = filter.length; f < len; ++f) {
  
                  prop    = Object.keys(filter[f])[0];
                  key     = filter[f][prop];
  
                  result  = sortOp[key](prop, content);
              }
          } else {
  
              if (filter.count() > 1) {
  
                  for (var f in filter) {
                      prop    = Object.keys(filter)[0];
                      key     = filter[prop];
  
                      result  = sortOp[key](prop, content);
                  }
  
              } else {
                  prop    = Object.keys(filter)[0];
                  key     = filter[prop];
  
                  result  = sortOp[key](prop, content);
              }
          }
  
  
  
          // chaining
          result.findOne  = instance.findOne;
          result.limit    = instance.limit;
          result.notIn    = instance.notIn;
          result.update   = instance.update;
          result.replace  = instance.replace;
          result.delete   = instance.delete;
  
          return result
      }