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.14.2 to 0.14.3

13

index.js

@@ -124,2 +124,15 @@ /*!

this.expose('Views');
// ensure that plugins are loaded onto collections
// created after the plugins are registered
this.on('use', function(fn, app) {
if (!fn || fn._createRegistered) return;
fn._createRegistered = true;
for (var key in app.views) {
if (app.views.hasOwnProperty(key)) {
app[key].use(fn);
}
}
});
};

@@ -126,0 +139,0 @@

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

// setup listeners
this.listen(this);
// add constructors

@@ -99,2 +102,21 @@ this.define('List', opts.List || require('./list'));

/**
* Built-in listeners
*/
Views.prototype.listen = function(collection) {
// ensure that plugins are loaded onto views
// created after the plugins are registered
this.on('use', function(fn) {
if (!fn || fn._createRegistered) return;
fn._createRegistered = true;
for (var key in collection.views) {
if (collection.views.hasOwnProperty(key)) {
collection.views[key].use(fn);
}
}
});
};
/**
* Set a view on the collection. This is identical to [addView](#addView)

@@ -101,0 +123,0 @@ * except `setView` does not emit an event for each view.

4

package.json
{
"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.14.2",
"version": "0.14.3",
"homepage": "https://github.com/jonschlinkert/templates",

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

"base-option": "^0.6.1",
"base-plugins": "^0.4.3",
"base-plugins": "^0.4.4",
"clone": "^1.0.2",

@@ -32,0 +32,0 @@ "clone-stats": "0.0.1",

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