Socket
Socket
Sign inDemoInstall

paginator

Package Overview
Dependencies
0
Maintainers
2
Versions
3
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.0.2 to 1.0.0

6

index.js

@@ -21,3 +21,3 @@ module.exports = Paginator;

//
// (new Pagianator(paginator.build(100, 2)
// (new Paginator(paginator.build(100, 2)
Paginator.prototype.build = function(total_results, current_page) {

@@ -27,2 +27,6 @@ // We want the number of pages, rounded up to the nearest page.

// Ensure both total_results and current_page are treated as Numbers
total_results = parseInt(total_results, 10);
current_page = parseInt(current_page, 10) || 1;
// Obviously we can't be on a negative or 0 page.

@@ -29,0 +33,0 @@ if (current_page < 1) { current_page = 1; }

4

package.json
{
"name": "paginator",
"description": "Generic pagination algorithm wrapped in a CommonJS module",
"version": "0.0.2",
"version": "1.0.0",
"author": {

@@ -11,3 +11,3 @@ "name": "Conrad Pankoff",

"url": "http://github.com/deoxxa/paginator",
"license": "BSD",
"license": "MIT",
"repository": { "type":"git", "url":"git://github.com/deoxxa/paginator.git" },

@@ -14,0 +14,0 @@ "keywords": [

@@ -51,9 +51,2 @@ Paginator

3-clause BSD. A copy is included with the source.
Contact
-------
* GitHub ([http://github.com/deoxxa](deoxxa))
* Twitter ([http://twitter.com/deoxxa](@deoxxa))
* Email ([mailto:deoxxa@fknsrs.biz](deoxxa@fknsrs.biz))
Licensed under an MIT license.
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