New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

cortex-handlebars-compiler

Package Overview
Dependencies
Maintainers
2
Versions
32
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cortex-handlebars-compiler - npm Package Compare versions

Comparing version 1.0.3 to 1.0.4

33

index.js

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

// @param {Object} options basic information of the template, not userdata.
// @param {Object} options basic information of the template, not userdata.
// Including:

@@ -43,2 +43,5 @@ // - information of the template

this.href_root = options.href_root;
this.hosts = options.hosts;
this.mod_root = options.mod_root;
this.html_root = options.html_root;

@@ -97,3 +100,3 @@ if (this.href_root) {

// `handlebars` is a singleton,
// we need to override helpers whenever we execute `handlebars.compile`
// we need to override helpers whenever we execute `handlebars.compile`
Object.keys(this.helpers).forEach(function (helper) {

@@ -145,3 +148,18 @@ var handler = this.helpers[helper];

Compiler.prototype._resolve_path = function(path){
var root = this.mod_root + this.html_root;
var hosts = this.hosts;
var absolute_path = node_path.join(root, path);
if(root && hosts){
path = "//" + hosts[ absolute_path.length % hosts.length ] + absolute_path;
}else{
path = path;
}
return this._to_url_path(path);
}
Compiler.prototype._static_handler = function(title, options) {

@@ -154,3 +172,6 @@ var ext = node_path.extname(title);

var changed_ext = this.ext[ext_name] || ext;
return dir + '/' + base + changed_ext;
var absolute = this._resolve_path(dir + '/' + base + changed_ext);
return absolute;
};

@@ -284,3 +305,3 @@

Compiler.prototype._to_url_path = function(path){
return path.replace(/\\/g,'\/')
return path.replace(/\\/g,'\/');
}

@@ -293,3 +314,3 @@

'graph:' + JSON.stringify(this.graph) + ',',
'path:"' + this._to_url_path(this.relative_cwd) + '"' + ',',
'path:"' + this._resolve_path(this.relative_cwd) + '"' + ',',
'});',

@@ -303,3 +324,3 @@ '</script>'

var path = node_path.join(this.relative_cwd, name, version, name + this.ext.js)
return this._to_url_path(path);
return this._resolve_path(path);
};

2

package.json
{
"name": "cortex-handlebars-compiler",
"version": "1.0.3",
"version": "1.0.4",
"description": "Handlebar helpers for cortex template.",

@@ -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