xvideosx 1.4.7 → 1.4.8
Sign up to get free protection for your applications and to get access to all the features.
- package/lib/api/videos/newfresh/createHasNextFunction.js +10 -0
- package/lib/api/videos/newfresh/createHasPreviousFunction.js +10 -0
- package/lib/api/videos/newfresh/createNextFunction.js +1 -1
- package/lib/api/videos/newfresh/createPreviousFunction.js +1 -1
- package/lib/api/videos/newfresh/createRefreshFunction.js +1 -1
- package/package.json +1 -1
@@ -0,0 +1,10 @@
|
|
1
|
+
const hasNextFunction = (currentPage, pages) => () => {
|
2
|
+
return currentPage < Math.max(...pages);
|
3
|
+
};
|
4
|
+
|
5
|
+
const createHasNextFunction = (pagination) => {
|
6
|
+
const { page, pages } = pagination;
|
7
|
+
return hasNextFunction(page, pages);
|
8
|
+
};
|
9
|
+
|
10
|
+
module.exports = createHasNextFunction;
|
@@ -0,0 +1,10 @@
|
|
1
|
+
const hasPreviousFunction = (currentPage, pages) => () => {
|
2
|
+
return currentPage > Math.min(...pages);
|
3
|
+
};
|
4
|
+
|
5
|
+
const createHasPreviousFunction = (pagination) => {
|
6
|
+
const { page, pages } = pagination;
|
7
|
+
return hasPreviousFunction(page, pages);
|
8
|
+
};
|
9
|
+
|
10
|
+
module.exports = createHasPreviousFunction;
|