lib/responses.js
function listWithPublishedVersions(req, res) {
  const publishedString = '@published',
    options = {
      transforms() {
        return [filter({ wantStrings: true }, function (str) {
          return str.indexOf(publishedString) !== -1;
        })];
      }
    };

  // Trim the URI to `../pages` for the query to work
  req.uri = req.uri.replace(`/${publishedString}`, '');
  return list(options)(req, res);
}
function listWithPublishedVersions(req, res) {
  const publishedString = '@published',
    options = {
      transforms() {
        return [filter({ wantStrings: true }, function (str) {
          return str.indexOf(publishedString) !== -1;
        })];
      }
    };

  // Trim the URI to `../pages` for the query to work
  req.uri = req.uri.replace(`/${publishedString}`, '');
  return list(options)(req, res);
}
function listWithPublishedVersions ( req , res ) { const publishedString = '@published' , options = { transforms ( ) { return [ filter ( { wantStrings : true } , function ( str ) { return str . indexOf ( publishedString ) !== - 1 ; } ) ] ; } } ; // Trim the URI to `../pages` for the query to work req . uri = req . uri . replace ( ` ${ publishedString } ` , '' ) ; return list ( options ) ( req , res ) ; }
List all things in the db that start with this prefix
_and_ are published

@param {Object} req
@param {Object} res
@returns {Function}
List all things in the db that start with this prefix _and_ are published