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

jade

Package Overview
Dependencies
Maintainers
4
Versions
131
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jade - npm Package Compare versions

Comparing version 1.4.2 to 1.5.0

2

component.json

@@ -5,3 +5,3 @@ {

"description": "Jade template runtime",
"version": "1.4.2",
"version": "1.5.0",
"keywords": [

@@ -8,0 +8,0 @@ "template"

@@ -230,4 +230,31 @@ 'use strict';

/**
* Compile a `Function` representation of the given jade file.
*
* Options:
*
* - `compileDebug` when `false` debugging code is stripped from the compiled
template, when it is explicitly `true`, the source code is included in
the compiled template for better accuracy.
*
* @param {String} path
* @param {Options} options
* @return {Function}
* @api public
*/
exports.compileFile = function (path, options) {
options = options || {};
var key = path + ':string';
options.filename = path;
var str = options.cache
? exports.cache[key] || (exports.cache[key] = fs.readFileSync(path, 'utf8'))
: fs.readFileSync(path, 'utf8');
return options.cache
? exports.cache[path] || (exports.cache[path] = exports.compile(str, options))
: exports.compile(str, options);
};
/**

@@ -234,0 +261,0 @@ * Render the given `str` of jade.

@@ -32,2 +32,3 @@ 'use strict';

this.dependencies = [];
this.inBlock = 0;
};

@@ -148,3 +149,3 @@

Object.keys(this.blocks).forEach(function (name) {
if (blocks.indexOf(name) === -1) {
if (blocks.indexOf(name) === -1 && !this.blocks[name].isSubBlock) {
console.warn('Warning: Unexpected block "'

@@ -509,6 +510,11 @@ + name

var line = block.line;
this.inBlock++;
block = 'indent' == this.peek().type
? this.block()
: new nodes.Block(new nodes.Literal(''));
this.inBlock--;
block.name = name;
block.line = line;

@@ -538,2 +544,4 @@ var prev = this.blocks[name] || {prepended: [], appended: []}

block.isSubBlock = this.inBlock > 0;
return this.blocks[name] = block;

@@ -540,0 +548,0 @@ },

{
"name": "jade",
"description": "Jade template engine",
"version": "1.4.2",
"version": "1.5.0",
"author": "TJ Holowaychuk <tj@vision-media.ca>",

@@ -6,0 +6,0 @@ "maintainers": [

Sorry, the diff of this file is too big to display

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