Socket
Socket
Sign inDemoInstall

compact-pagination

Package Overview
Dependencies
0
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.0.1 to 1.0.2

8

lib/index.js

@@ -27,10 +27,10 @@ 'use strict';

var lastPage = pages[pages.length - 1].page;
if (lastPage > totalSize - 2) {
pages = pages.concat([{ isSeparator: true }, { page: totalSize }]);
if (lastPage === totalSize - 1) {
pages = pages.concat([{ page: totalSize }]);
} else if (lastPage === totalSize - 2) {
pages = pages.concat([{ page: totalSize - 1 }, { page: totalSize }]);
} else if (lastPage === totalSize - 1) {
pages = pages.concat([{ page: totalSize }]);
} else if (lastPage !== totalSize) {
pages = pages.concat([{ isSeparator: true }, { page: totalSize }]);
}
return pages;
};
{
"name": "compact-pagination",
"version": "1.0.1",
"version": "1.0.2",
"description": "no fuss pagination helper",

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

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc