search-sdk
Advanced tools
Comparing version 0.5.3 to 0.5.4
(function() { | ||
var AzureSearch, HighlandPagination, Promise, Search, _, highland, | ||
var AzureSearch, HighlandPagination, Promise, Search, _, highland, retry, | ||
bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }, | ||
@@ -10,2 +10,4 @@ slice = [].slice; | ||
retry = require("bluebird-retry"); | ||
AzureSearch = require("azure-search"); | ||
@@ -102,19 +104,21 @@ | ||
_requestPage = function(skip) { | ||
var top; | ||
if (skip == null) { | ||
skip = count - pageSize; | ||
} | ||
skip = Math.min(100000, skip); | ||
top = Math.min(pageSize, pageSize + skip); | ||
skip = Math.max(0, skip); | ||
return _this.find(_.merge({ | ||
skip: skip, | ||
top: top | ||
}, query)).then(function(arg1) { | ||
var items; | ||
items = arg1.items; | ||
return { | ||
items: items, | ||
nextToken: items.length === pageSize && skip > 0 ? skip - pageSize : null | ||
}; | ||
return retry(function() { | ||
var top; | ||
skip = Math.min(100000, skip); | ||
top = Math.min(pageSize, pageSize + skip); | ||
skip = Math.max(0, skip); | ||
return _this.find(_.merge({ | ||
skip: skip, | ||
top: top | ||
}, query)).then(function(arg1) { | ||
var items; | ||
items = arg1.items; | ||
return { | ||
items: items, | ||
nextToken: items.length === pageSize && skip > 0 ? skip - pageSize : null | ||
}; | ||
}); | ||
}); | ||
@@ -121,0 +125,0 @@ }; |
{ | ||
"name": "search-sdk", | ||
"version": "0.5.3", | ||
"version": "0.5.4", | ||
"description": "search-sdk", | ||
@@ -16,2 +16,3 @@ "main": "index.js", | ||
"azure-search": "0.0.16", | ||
"bluebird-retry": "^0.11.0", | ||
"lodash": "4.17.19" | ||
@@ -18,0 +19,0 @@ }, |
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
6607
124
3
+ Addedbluebird-retry@^0.11.0
+ Addedbluebird@3.7.2(transitive)
+ Addedbluebird-retry@0.11.0(transitive)