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

view-helpers

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

view-helpers - npm Package Compare versions

Comparing version 0.1.0 to 0.1.1

5

History.md
0.1.1 / 2013-06-18
==================
* fix page counter. fixes #4
0.1.0 / 2013-06-14

@@ -3,0 +8,0 @@ ==================

18

index.js

@@ -87,13 +87,15 @@

params.page = 0
var clas = page == 0 ? "active" : "no"
str += '<li class="'+clas+'"><a href="?'+qs.stringify(params)+'">First</a></li>'
for (var p = 1; p < pages; p++) {
params.page = 1
var clas = page == 1 ? "active" : "no"
for (var p = 1; p <= pages; p++) {
params.page = p
clas = page == p ? "active" : "no"
str += '<li class="'+clas+'"><a href="?'+qs.stringify(params)+'">'+ p +'</a></li>'
var href = p === 1
? url.parse(req.url).pathname
: '?' + qs.stringify(params)
str += '<li class="'+clas+'"><a href="'+ href +'">'+ p +'</a></li>'
}
params.page = --p
clas = page == params.page ? "active" : "no"
str += '<li class="'+clas+'"><a href="?'+qs.stringify(params)+'">Last</a></li>'

@@ -100,0 +102,0 @@ return str

{
"name": "view-helpers",
"version": "0.1.0",
"version": "0.1.1",
"description": "View helper methods for expressjs and other node stuff",

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

## View Helpers
This module is used as express middleware and it provides some helper methods.
This module is used as express middleware and it provides helper methods to the views.

@@ -5,0 +5,0 @@ ## Installation

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