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

prisma-extension-pagination

Package Overview
Dependencies
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

prisma-extension-pagination - npm Package Compare versions

Comparing version 0.7.1 to 0.7.2

33

dist/extension.js

@@ -19,3 +19,3 @@ "use strict";

withPages: (...args_1) => __awaiter(this, [...args_1], void 0, function* (options = {}) {
const { page, limit, includePageCount } = Object.assign(Object.assign({ page: 1, includePageCount: false }, globalOptions === null || globalOptions === void 0 ? void 0 : globalOptions.pages), options);
const { page = 1, limit, includePageCount = false, } = Object.assign(Object.assign({}, globalOptions === null || globalOptions === void 0 ? void 0 : globalOptions.pages), options);
if (typeof page !== "number" ||

@@ -41,19 +41,16 @@ page < 1 ||

withCursor: (...args_2) => __awaiter(this, [...args_2], void 0, function* (options = {}) {
const { limit, after, before, getCursor, parseCursor } = Object.assign(Object.assign({
// @ts-expect-error actual fields of the model are not known
getCursor({ id }) {
if (typeof id !== "number") {
throw new Error("Unable to serialize cursor");
}
return id.toString();
},
parseCursor(cursor) {
const id = parseInt(cursor, 10);
if (Number.isNaN(id)) {
throw new Error("Unable to parse cursor");
}
return {
id,
};
} }, globalOptions === null || globalOptions === void 0 ? void 0 : globalOptions.cursor), options);
const { limit, after, before, getCursor = ({ id }) => {
if (typeof id !== "number") {
throw new Error("Unable to serialize cursor");
}
return id.toString();
}, parseCursor = (cursor) => {
const id = parseInt(cursor, 10);
if (Number.isNaN(id)) {
throw new Error("Unable to parse cursor");
}
return {
id,
};
}, } = Object.assign(Object.assign({}, globalOptions === null || globalOptions === void 0 ? void 0 : globalOptions.cursor), options);
if (limit !== null && typeof limit !== "number") {

@@ -60,0 +57,0 @@ throw new Error("Missing limit value");

{
"name": "prisma-extension-pagination",
"version": "0.7.1",
"version": "0.7.2",
"description": "Prisma Client extension for pagination",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

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