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.1.11 to 0.1.12

40

lib/expressions.js

@@ -22,2 +22,3 @@ var serializeObject = require('serialize-object');

exports.SequenceExpression = SequenceExpression;
exports.ScopedModelExpression = ScopedModelExpression;

@@ -532,6 +533,41 @@ function lookup(segments, value) {

SequenceExpression.prototype.dependencies = function(context, forInnerPath) {
var last = this.args[this.args.length - 1];
return last.dependencies(context, forInnerPath);
var dependencies = [];
for (var i = 0, len = this.args.length; i < len; i++) {
var argDependencies = this.args[i].dependencies(context, forInnerPath);
for (var j = 0, jLen = argDependencies.length; j < jLen; j++) {
dependencies.push(argDependencies[j]);
}
}
return dependencies;
};
function ScopedModelExpression(expression, meta) {
this.expression = expression;
this.meta = meta;
}
ScopedModelExpression.prototype = new Expression();
ScopedModelExpression.prototype.type = 'ScopedModelExpression';
ScopedModelExpression.prototype.serialize = function() {
return serializeObject.instance(this, this.expression, this.meta);
};
// Return a scoped model instead of the value
ScopedModelExpression.prototype.get = function(context) {
var segments = this.pathSegments(context);
if (!segments) return;
return context.controller.model.scope(segments.join('.'));
};
// Delegate other methods to the inner expression
ScopedModelExpression.prototype.resolve = function(context) {
return this.expression.resolve(context);
};
ScopedModelExpression.prototype.dependencies = function(context, forInnerPath) {
return this.expression.dependencies(context, forInnerPath);
};
ScopedModelExpression.prototype.pathSegments = function(context) {
return this.expression.pathSegments(context);
};
ScopedModelExpression.prototype.set = function(context, value) {
return this.expression.set(context, value);
};
function outerDependency(expression, context, forInnerPath) {

@@ -538,0 +574,0 @@ if (forInnerPath) return;

2

package.json
{
"name": "derby-templates",
"version": "0.1.11",
"version": "0.1.12",
"description": "",

@@ -5,0 +5,0 @@ "main": "index.js",

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