Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Wrap templates with layouts. Layouts can be nested and optionally use other layouts.
Wrap templates with layouts. Layouts can be nested and optionally use other layouts.
npm i layouts --save
var layouts = require('layouts');
Example
layouts('<div>This is content</div>', 'base', {base: {content: 'base above\n{% body %}\nbase below'}});
Results in:
base above
<div>This is content</div>
base below
layouts(string, name, layouts);
Given an object of layouts
, and the name
of a starting layout:
layouts
object) for the given string
, thenstr
{String}: The content string that should be wrapped with a layout.name
{String}: The name of the layout to use.layout{s}
{Object}: Object of layouts. name
should be a key on this object.options
{Object}
layoutDelims
{Object}: Custom delimiters to use.defaultLayout
{Object}: Default layout to use.returns
{String}: Returns the original string, wrapped with a layout, or layout stack.Brian Woodward
Copyright (c) 2014-2015 Brian Woodward
Released under the MIT license
This file was generated by verb on February 13, 2015.
FAQs
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. La
The npm package layouts receives a total of 26,194 weekly downloads. As such, layouts popularity was classified as popular.
We found that layouts demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.