Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@libj/pager

Package Overview
Dependencies
Maintainers
2
Versions
34
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@libj/pager - npm Package Compare versions

Comparing version 0.1.1 to 0.2.0

2

dist/Pager.d.ts
import { PagerOptions, PagerRequest } from './types';
export declare class Pager<T = any> {
private request;
private options;
constructor(// eslint-disable-line no-useless-constructor

@@ -12,4 +11,5 @@ request: PagerRequest<T>, options?: PagerOptions);

/*** Private ***/
private options;
private page;
private ended;
}
"use strict";
var __assign = (this && this.__assign) || function () {
__assign = Object.assign || function(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
t[p] = s[p];
}
return t;
};
return __assign.apply(this, arguments);
};
Object.defineProperty(exports, "__esModule", { value: true });

@@ -6,2 +17,3 @@ exports.Pager = void 0;

perPage: 25,
initialPage: 1,
};

@@ -13,7 +25,6 @@ var Pager = /** @class */ (function () {

this.request = request;
this.options = options;
/*** Private ***/
this.page = 1;
this.ended = false;
} // eslint-disable-line no-empty-function
this.options = __assign(__assign({}, DefaultOptions), options);
this.page = this.options.initialPage;
}
/*** Public ***/

@@ -20,0 +31,0 @@ Pager.prototype.next = function () {

export declare type PagerRequest<T = any> = (page: number, perPage: number) => Promise<T[]>;
export interface PagerOptions {
perPage?: number;
initialPage?: number;
}
{
"name": "@libj/pager",
"version": "0.1.1",
"version": "0.2.0",
"description": "Abstract promise based pager",

@@ -25,3 +25,3 @@ "author": "Sergey Poskachey <seregynp@gmail.com>",

],
"gitHead": "eb560f793fe4fb0020bbfe0e0b377c940fa4fa13"
"gitHead": "c03aa6873de49627fc96bd0288e7d9f7408c1afc"
}

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc