New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.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.2.5 to 0.2.6

7

index.js

@@ -221,3 +221,2 @@ /*!

var collection = this.collection(opts, true);
var self = this;

@@ -298,2 +297,8 @@ // get the collection inflections, e.g. page/pages

/**
* Expose package metadata
*/
utils.define(Templates, 'metadata', require('./package'));
/**
* Expose `Templates`

@@ -300,0 +305,0 @@ */

18

lib/plugins/helpers.js
'use strict';
var utils = require('../utils');
var init = require('./init');
module.exports = function initHelpers(app) {
var Helpers = utils.Helpers;
var async = utils.loader(app._.helpers.async, {async: true});

@@ -25,3 +23,3 @@ var sync = utils.loader(app._.helpers.sync);

app.mixin('helper', function(key, fn) {
app.mixin('helper', function() {
sync.apply(sync, arguments);

@@ -66,3 +64,3 @@ return this;

app.mixin('asyncHelper', function(key, fn) {
app.mixin('asyncHelper', function() {
async.apply(async, arguments);

@@ -82,3 +80,3 @@ return this;

* ```
* @name .asyncHelper
* @name .asyncHelpers
* @param {Object|Array} `helpers` Object, array of objects, or glob patterns.

@@ -88,3 +86,3 @@ * @api public

app.mixin('asyncHelpers', function(helpers) {
app.mixin('asyncHelpers', function() {
async.apply(async, arguments);

@@ -100,7 +98,9 @@ return this;

* {%= type %}.helperGroup('mdu', {
* reflink: function() {},
* link: function() {},
* foo: function() {},
* bar: function() {},
* });
*
* //=> <%%= mdu.link() %>
* // Usage:
* // <%= mdu.foo() %>
* // <%= mdu.bar() %>
* ```

@@ -107,0 +107,0 @@ * @name .helperGroup

@@ -5,3 +5,2 @@ 'use strict';

var utils = require('./lazy');
var seen = {};

@@ -8,0 +7,0 @@ for (var key in common) {

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

Views.prototype.addView = function(key, value) {
Views.prototype.addView = function(/*key, value*/) {
var args = [].slice.call(arguments);

@@ -154,0 +154,0 @@ this.emit.call(this, 'addView', args);

{
"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.2.5",
"version": "0.2.6",
"homepage": "https://github.com/jonschlinkert/templates",

@@ -69,2 +69,3 @@ "author": "Jon Schlinkert (https://github.com/jonschlinkert)",

"kind-of": "^2.0.1",
"look-up": "^0.8.1",
"mocha": "*",

@@ -71,0 +72,0 @@ "parser-front-matter": "^1.2.5",

@@ -202,3 +202,3 @@ # templates [![NPM version](https://badge.fury.io/js/templates.svg)](http://badge.fury.io/js/templates) [![Build Status](https://travis-ci.org/jonschlinkert/templates.svg)](https://travis-ci.org/jonschlinkert/templates) [![Coverage Status](https://img.shields.io/coveralls/jonschlinkert/templates.svg)](https://coveralls.io/r/jonschlinkert/templates)

### [.helper](lib/plugins/helpers.js#L25)
### [.helper](lib/plugins/helpers.js#L23)

@@ -220,3 +220,3 @@ Register a template helper.

### [.helpers](lib/plugins/helpers.js#L45)
### [.helpers](lib/plugins/helpers.js#L43)

@@ -239,3 +239,3 @@ Register multiple template helpers.

### [.asyncHelper](lib/plugins/helpers.js#L65)
### [.asyncHelper](lib/plugins/helpers.js#L63)

@@ -257,3 +257,3 @@ Get or set an async helper. If only the name is passed, the helper is returned.

### [.asyncHelper](lib/plugins/helpers.js#L85)
### [.asyncHelpers](lib/plugins/helpers.js#L83)

@@ -289,7 +289,9 @@ Register multiple async template helpers.

app.helperGroup('mdu', {
reflink: function() {},
link: function() {},
foo: function() {},
bar: function() {},
});
//=> <%%= mdu.link() %>
// Usage:
// <%= mdu.foo() %>
// <%= mdu.bar() %>
```

@@ -1223,3 +1225,3 @@

As of October 02, 2015, code coverage is 100%.
As of October 04, 2015, code coverage is 100%.

@@ -1253,2 +1255,2 @@ ```sh

_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on October 02, 2015._
_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on October 04, 2015._
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