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.3.2 to 0.3.3

32

index.js

@@ -215,14 +215,32 @@ /*!

// create loader functions for adding views to this collection
this.define(plural, collection.addViews.bind(collection));
this.define(single, collection.addView.bind(collection));
utils.forward({
fromObj: collection,
toObj: this,
fromMethod: 'addViews',
toMethod: plural
});
// decorate loader methods with collection methods
this[plural].__proto__ = collection;
this[single].__proto__ = collection;
utils.forward({
fromObj: collection,
toObj: this,
fromMethod: 'addView',
toMethod: single
});
// create aliases on the collection for
// addView/addViews to support chaining
collection.define(plural, this[plural]);
collection.define(single, this[single]);
utils.forward({
fromObj: collection,
toObj: collection,
fromMethod: 'addViews',
toMethod: plural
});
utils.forward({
fromObj: collection,
toObj: collection,
fromMethod: 'addView',
toMethod: single
});
// run collection plugins

@@ -229,0 +247,0 @@ this.plugins.forEach(function (fn) {

@@ -91,1 +91,14 @@ 'use strict';

};
utils.forward = function (opts) {
var from = opts.fromObj;
var to = opts.toObj;
to.define(opts.toMethod, {
configurable: true,
get: function () {
var fn = from[opts.fromMethod].bind(from);
fn.__proto__ = from;
return fn;
}
});
}
{
"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.3.2",
"version": "0.3.3",
"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