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

layouts

Package Overview
Dependencies
Maintainers
2
Versions
48
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

layouts - npm Package Compare versions

Comparing version 0.2.5 to 0.2.6

test/stack-with-properties.js

5

index.js

@@ -245,5 +245,8 @@ /*!

content = content.replace(this.regex, tmpl.content);
content = _.template(content, this.context);
return {
data: this.context,
content: content.replace(this.regex, tmpl.content),
content: content,
regex: this.regex,

@@ -250,0 +253,0 @@ tag: tag

2

package.json
{
"name": "layouts",
"description": "Wrap templates with layouts. Layouts can be nested and optionally use other layouts.",
"version": "0.2.5",
"version": "0.2.6",
"homepage": "https://github.com/jonschlinkert/layouts",

@@ -6,0 +6,0 @@ "author": {

@@ -21,3 +21,3 @@ /*!

name: path.basename(filepath, path.extname(filepath)),
layout: obj.data && obj.data.layout,
data: obj.data,
content: obj.content.replace(/^\s*/, '')

@@ -29,3 +29,3 @@ };

var obj = page(filepath);
layouts.setLayout(obj.name, obj.layout, obj.content);
layouts.setLayout(obj.name, obj.data, obj.content);
});

@@ -59,3 +59,3 @@

'A above',
'I\'m a <%= title %>', // should not be compiled
'I\'m a Foo',
'A below',

@@ -62,0 +62,0 @@ 'B below',

@@ -24,3 +24,3 @@ /*!

layouts.setLayout({f: { layout: 'last', content: 'F above\n{{body}}\nF below' }});
layouts.setLayout({first: { layout: 'a', content: 'I\'m a <%= title %>' }});
layouts.setLayout({first: { title: 'first', layout: 'a', content: 'I\'m a <%= title %>' }});

@@ -37,3 +37,3 @@ it('should extend the `cache`.', function () {

'A above',
'I\'m a <%= title %>', // should not be compiled
'I\'m a first',
'A below',

@@ -54,3 +54,3 @@ 'B below',

layouts.setLayout('first', 'a', 'I\'m a <%= title %>');
layouts.setLayout('first', 'a', 'I\'m a < %= title %>');
layouts.setLayout('a', 'b', 'A above\n{{body}}\nA below');

@@ -74,3 +74,3 @@ layouts.setLayout('b', 'c', 'B above\n{{body}}\nB below');

'A above',
'I\'m a <%= title %>', // should not be compiled
'I\'m a < %= title %>', // should not be compiled
'A below',

@@ -92,3 +92,3 @@ 'B below',

layouts.setLayout('first', {layout: 'a'}, 'I\'m a <%= title %>');
layouts.setLayout('first', {title: 'first', layout: 'a'}, 'I\'m a <%= title %>');
layouts.setLayout('a', {layout: 'b'}, 'A above\n{{body}}\nA below');

@@ -112,3 +112,3 @@ layouts.setLayout('b', {layout: 'c'}, 'B above\n{{body}}\nB below');

'A above',
'I\'m a <%= title %>', // should not be compiled
'I\'m a first',
'A below',

@@ -129,3 +129,3 @@ 'B below',

layouts.setLayout('first', {layout: 'a', content: 'I\'m a <%= title %>'});
layouts.setLayout('first', {title: 'first', layout: 'a', content: 'I\'m a <%= title %>'});
layouts.setLayout('a', {layout: 'b', content: 'A above\n{{body}}\nA below'});

@@ -149,3 +149,3 @@ layouts.setLayout('b', {layout: 'c', content: 'B above\n{{body}}\nB below'});

'A above',
'I\'m a <%= title %>', // should not be compiled
'I\'m a first',
'A below',

@@ -174,3 +174,3 @@ 'B below',

f: { layout: 'last', content: 'F above\n{{body}}\nF below' },
first: { layout: 'a', content: 'I\'m a <%= title %>' }
first: { title: 'first', layout: 'a', content: 'I\'m a <%= title %>' }
});

@@ -188,3 +188,3 @@

'A above',
'I\'m a <%= title %>', // should not be compiled
'I\'m a first',
'A below',

@@ -191,0 +191,0 @@ 'B below',

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