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

pagination

Package Overview
Dependencies
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pagination - npm Package Compare versions

Comparing version 0.3.5 to 0.3.6

20

lib/pagination.js

@@ -5,3 +5,3 @@ (function(module) {

/* Check if clientside or serverside */
if( typeof module == "undefined") {
if( typeof module === 'undefined') {
window.pagination = {};

@@ -22,3 +22,3 @@ module = {

subc.superclass = superc.prototype;
if(superc.prototype.constructor == Object.prototype.constructor) {
if(superc.prototype.constructor === Object.prototype.constructor) {
superc.prototype.constructor = superc;

@@ -97,3 +97,3 @@ }

var startPage, endPage, pageCount;
var oldPageLinks = (pageLinks % 2 == 0) ? 1 : 0, i, half;
var oldPageLinks = (pageLinks % 2 === 0) ? 1 : 0, i, half;
var result = {

@@ -163,3 +163,3 @@ prelink : this.options.prelink,

result.fromResult = (current - 1) * rowsPerPage + 1;
if(current == pageCount) {
if(current === pageCount) {
result.toResult = totalResult;

@@ -180,3 +180,3 @@ } else {

if (this.options.slashSeparator) {
if (prelink[prelink.length - 1] != '/') {
if (prelink[prelink.length - 1] !== '/') {
prelink += '/';

@@ -186,4 +186,4 @@ }

}
if(prelink.indexOf('?') != -1) {
if(prelink[prelink.length - 1] != '?' && prelink[prelink.length - 1] != '&') {
if(prelink.indexOf('?') !== -1) {
if(prelink[prelink.length - 1] !== '?' && prelink[prelink.length - 1] !== '&') {
prelink += '&';

@@ -231,8 +231,8 @@ }

if(result.range[i] == result.current) {
if(result.range[i] === result.current) {
className = 'paginator-current';
}
if(i == 0) {
if(i === 0) {
className += ' paginator-page-first';
} else if(i == len - 1) {
} else if(i === len - 1) {
className += ' paginator-page-last';

@@ -239,0 +239,0 @@ }

@@ -14,3 +14,3 @@ {

},
"version": "0.3.5",
"version": "0.3.6",
"scripts": {

@@ -17,0 +17,0 @@ "test": "vows --spec tests/*"

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