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

derby-templates

Package Overview
Dependencies
Maintainers
3
Versions
45
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

derby-templates - npm Package Compare versions

Comparing version 0.4.1 to 0.4.2

34

lib/templates.js

@@ -10,2 +10,3 @@ var saddle = require('saddle');

exports.Marker = Marker;
exports.View = View;

@@ -21,3 +22,2 @@ exports.ViewInstance = ViewInstance;

exports.ComponentOn = ComponentOn;
exports.ComponentMarker = ComponentMarker;
exports.AsProperty = AsProperty;

@@ -109,2 +109,20 @@ exports.AsObject = AsObject;

var markerHooks = [{
emit: function(context, node) {
node.$component = context.controller;
context.controller.markerNode = node;
}
}];
function Marker(data) {
saddle.Comment.call(this, data, markerHooks);
}
Marker.prototype = Object.create(saddle.Comment.prototype);
Marker.prototype.type = 'Marker';
Marker.prototype.serialize = function() {
return serializeObject.instance(this, this.data);
}
Marker.prototype.get = function() {
return '';
};
function ViewAttributesMap(source) {

@@ -206,4 +224,3 @@ var items = source.split(/\s+/);

if (this.componentFactory) {
var hooks = [new ComponentMarker()];
var marker = new saddle.Comment(this.name, hooks);
var marker = new Marker(this.name);
this.template.content.unshift(marker);

@@ -450,13 +467,2 @@ }

function ComponentMarker() {}
ComponentMarker.prototype = Object.create(MarkupHook.prototype);
ComponentMarker.prototype.type = 'ComponentMarker';
ComponentMarker.prototype.serialize = function() {
return serializeObject.instance(this);
};
ComponentMarker.prototype.emit = function(context, node) {
node.$component = context.controller;
context.controller.markerNode = node;
};
function AsProperty(segments) {

@@ -463,0 +469,0 @@ this.segments = segments;

{
"name": "derby-templates",
"version": "0.4.1",
"version": "0.4.2",
"main": "index.js",

@@ -5,0 +5,0 @@ "scripts": {

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