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.3 to 0.3.4

18

lib/pagination.js

@@ -73,7 +73,3 @@ (function(module) {

for( keys = Object.keys(options), i = 0, len = keys.length; i < len; i++) {
try {
this.set(keys[i], options[keys[i]]);
} catch(e) {
}
this.set(keys[i], options[keys[i]]);
}

@@ -203,7 +199,5 @@ this._result = null;

SearchPaginator.prototype.render = function() {
var i, len, className;
var i, len, className, prelink;
var result = this.getPaginationData();
var prelink = this.preparePreLink(result.prelink);
var html = '';
html += '<div class="paginator">';
var html = '<div class="paginator">';

@@ -214,2 +208,5 @@ if(result.pageCount < 2) {

}
prelink = this.preparePreLink(result.prelink);
if(result.previous) {

@@ -264,4 +261,3 @@ html += '<a href="' + prelink + 'page=' + result.previous + '" class="paginator-previous">' + this.options.translator('PREVIOUS') + '</a>';

var prelink = this.preparePreLink(result.prelink);
var html = '';
html += '<div class="paginator">';
var html = '<div class="paginator">';
html += '<span class="paginator-current-report">';

@@ -268,0 +264,0 @@ html += this.renderCurrentPageReport(result.fromResult, result.toResult, result.totalResult);

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

},
"version": "0.3.3",
"version": "0.3.4",
"scripts": {

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

@@ -114,4 +114,6 @@ var assert = require('assert');

assert.equal('<div class="paginator"><span class="paginator-current-report">Results 41 - 50 of 100</span><a href="/?page=1" class="paginator-first">First</a><a href="/?page=4" class="paginator-previous">Previous</a><a href="/?page=6" class="paginator-next">Next</a><a href="/?page=10" class="paginator-last">Last</a></div>', enItem.render());
// testing if they affect each other on the translations
assert.equal('<div class="paginator"><span class="paginator-current-report">Resulten 41 - 50 van 100</span><a href="/?page=1" class="paginator-first">Eerst</a><a href="/?page=4" class="paginator-previous">Voorgaand</a><a href="/?page=6" class="paginator-next">Volgende</a><a href="/?page=10" class="paginator-last">Laatste</a></div>', item.render());
assert.equal('<div class="paginator"><span class="paginator-current-report">Results 41 - 50 of 100</span><a href="/?page=1" class="paginator-first">First</a><a href="/?page=4" class="paginator-previous">Previous</a><a href="/?page=6" class="paginator-next">Next</a><a href="/?page=10" class="paginator-last">Last</a></div>', enItem.render());
}
}).export(module)
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