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

templates

Package Overview
Dependencies
Maintainers
3
Versions
154
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

templates - npm Package Compare versions

Comparing version 0.10.4 to 0.10.5

README.md

11

lib/helpers.js

@@ -59,3 +59,3 @@ 'use strict';

app.asyncHelper(options.plural, function listHelper(context, cb) {
if (typeof context.fn !== 'function') {
if (typeof context === 'string') {
createdHelper.apply(this, arguments);

@@ -65,3 +65,10 @@ return;

var ctx = new List(collection);
cb(null, context.fn(ctx));
// render block helper with list as context
if (typeof context.fn === 'function') {
cb(null, context.fn(ctx));
return;
}
// return list when not used as a block helper
cb(null, ctx);
});

@@ -68,0 +75,0 @@

6

lib/list.js

@@ -455,9 +455,9 @@ 'use strict';

item.data.pager.index = items.length;
item.data.pager.current = item;
utils.define(item.data.pager, 'current', item);
if (items.length) {
var prev = items[items.length - 1];
item.data.pager.prev = prev;
prev.data.pager.next = item;
utils.define(item.data.pager, 'prev', prev);
utils.define(prev.data.pager, 'next', item);
}
}
{
"name": "templates",
"description": "System for creating and managing template collections, and rendering templates with any node.js template engine. Can be used as the basis for creating a static site generator or blog framework.",
"version": "0.10.4",
"version": "0.10.5",
"homepage": "https://github.com/jonschlinkert/templates",

@@ -6,0 +6,0 @@ "author": "Jon Schlinkert (https://github.com/jonschlinkert)",

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