feathers-query-filters
Advanced tools
Comparing version 1.4.0 to 1.5.0
@@ -7,2 +7,3 @@ /** | ||
*/ | ||
'use strict'; | ||
@@ -19,16 +20,9 @@ | ||
function getLimit(limit, paginate) { | ||
if (paginate && paginate['default']) { | ||
return Math.min(limit || paginate['default'], paginate.max || Number.MAX_VALUE); | ||
} | ||
return limit; | ||
} | ||
exports['default'] = function (query, paginate) { | ||
exports['default'] = function (query) { | ||
var filters = { | ||
$sort: query.$sort, | ||
$limit: getLimit(parse(query.$limit), paginate), | ||
$limit: parse(query.$limit), | ||
$skip: parse(query.$skip), | ||
$select: query.$select | ||
$select: query.$select, | ||
$populate: query.$populate | ||
}; | ||
@@ -41,2 +35,3 @@ | ||
delete query.$select; | ||
delete query.$populate; | ||
@@ -43,0 +38,0 @@ return filters; |
{ | ||
"name": "feathers-query-filters", | ||
"description": "Adds support for special query string params used for filtering data", | ||
"version": "1.4.0", | ||
"version": "1.5.0", | ||
"license": "MIT", | ||
@@ -6,0 +6,0 @@ "homepage": "https://github.com/feathersjs/feathers-query-filters", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
0
7176
31