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

abl-utils

Package Overview
Dependencies
Maintainers
1
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

abl-utils - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

2

package.json
{
"name": "abl-utils",
"title": "ABL - utils",
"version": "1.0.0",
"version": "1.0.1",
"license": "MIT",

@@ -6,0 +6,0 @@ "description": "description",

"use strict";
import debug from "debug";
import querystring from "querystring";
import {getServerUrl} from "./misc";
import {makeError} from "./error";

@@ -54,31 +52,2 @@ import {translate} from "abl-lang";

export function addPaginationHeaders(request, response, count) {
const last = Math.ceil(count / request.query.pageSize);
const url = `${getServerUrl()}${request.route.path}?`;
response.set("X-First-Page-Url", url + querystring.stringify({
pageSize: request.query.pageSize,
page: 0
}));
if (request.query.page !== 0) {
response.set("X-Prev-Page-Url", url + querystring.stringify({
pageSize: request.query.pageSize,
page: request.query.page - 1
}));
}
if (request.query.page !== last) {
response.set("X-Next-Page-Url", url + querystring.stringify({
pageSize: request.query.pageSize,
page: request.query.page + 1
}));
}
response.set("X-Last-Page-Url", url + querystring.stringify({
pageSize: request.query.pageSize,
page: last
}));
}
export function wrapJSON(method) {

@@ -85,0 +54,0 @@ return (request, response, next) => {

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