New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.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.10.1 to 0.10.2

22

index.js
'use strict';
var isFalsey = require('falsey');
var Buffer = require('buffer').Buffer;
var delims = require('delimiter-regex');
var get = require('get-value');
var lazy = require('lazy-cache')(require);
lazy('falsey', 'isFalsey');
lazy('is-buffer', 'isBuffer');
lazy('delimiter-regex', 'delims');
lazy('get-value', 'get');

@@ -40,3 +41,3 @@ /**

function renderLayouts(str, name, layoutStack, opts, fn) {
if (isBuffer(str)) {
if (lazy.isBuffer(str)) {
str = str.toString();

@@ -115,3 +116,3 @@ }

function assertLayout(value, defaultLayout) {
if (value === false || (value && isFalsey(value))) {
if (value === false || (value && lazy.isFalsey(value))) {
return null;

@@ -134,3 +135,3 @@ } else if (!value || value === true) {

if (tagName.indexOf('.') !== -1) {
return toString(get(data, tagName.trim()));
return toString(lazy.get(data, tagName.trim()));
}

@@ -161,3 +162,3 @@ return data[tagName.trim()];

if (Array.isArray(syntax)) {
return (cache[syntax] = delims(syntax));
return (cache[syntax] = lazy.delims(syntax));
}

@@ -173,6 +174,1 @@ }

}
function isBuffer(val) {
return typeof val === 'object'
&& val instanceof Buffer;
}
{
"name": "layouts",
"description": "Wraps templates with layouts. Layouts can use other layouts and be nested to any depth. This can be used 100% standalone to wrap any kind of file with banners, headers or footer content. Use for markdown, HTML, handlebars views, lo-dash templates, etc. Layouts can also be vinyl files.",
"version": "0.10.1",
"version": "0.10.2",
"homepage": "https://github.com/doowb/layouts",

@@ -23,8 +23,15 @@ "author": "Brian Woodward (https://github.com/doowb)",

"scripts": {
"test": "mocha"
"test": "mocha",
"prepublish": "browserify -o browser.js -e index.js -s index --bare"
},
"dependencies": {
"delimiter-regex": "^1.3.1",
"extend-shallow": "^2.0.1",
"falsey": "^0.2.1",
"get-value": "^1.1.5"
"get-value": "^1.1.5",
"is-buffer": "^1.0.2",
"isobject": "^2.0.0",
"kind-of": "^2.0.0",
"lazy-cache": "^0.2.3",
"noncharacters": "^1.1.0"
},

@@ -31,0 +38,0 @@ "devDependencies": {

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