Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
handlebars-by-pug
Advanced tools
Pug mixins for the outputting of the Handlebars code instead of plain HTML.
Pug mixins for the outputting of the Handlebars code instead of plain HTML.
npm i handlebars-by-pug -D -E
HandlebarsCondition
dl
dt.MemberProfile-Profile-KeyCell Full Name
dd.MemberProfile-Profile-ValueCell {{ fullName }}
+HandlebarsCondition("phoneNumber")
dt.MemberProfile-Profile-KeyCell Phone number
dd.MemberProfile-Profile-ValueCell {{ phoneNumber }}
Output (manually formatted):
<dl>
<dt class="MemberProfile-Profile-KeyCell">Full Name</dt>
<dd class="MemberProfile-Profile-ValueCell">{{ fullName }}</dd>
{{#if phoneNumber}}
<dt class="MemberProfile-Profile-KeyCell">Phone number</dt>
<dd class="MemberProfile-Profile-ValueCell">{{ phoneNumber }}</dd>
{{/if}}
</dl>
HandlebarsIteration
+HandlebarsCondition("items")
ul
+HandlebarsIteration("items")
li {{ this }}
Output (manually formatted):
{{#if items}}
<ul>
{{#each items}}
<li>{{ this }}</li>
{{/each}}
</ul>
{{/if}}
+HandlebarsHelper("unless", "license")
p WARNING: This entry does not have a license!
Output (manually formatted):
{{#unless license}}
<p>WARNING: This entry does not have a license!</p>
{{/unless}}
@yamato-daiwa/handlebars-extensions
npm i @yamato-daiwa/handlebars-extensions -E
AreStringsEqual--HandlebarsHelper
dl
dt Full Name
dd {{ fullName }}
+HandlebarsHelper("isNonEmptyObject", "socialNetworkProfilesURIs")
dt Social networks
dd
ul
+HandlebarsIteration("socialNetworkProfilesURIs")
li
+AreStringsEqual--HandlebarsHelper("@key", "facebook")
a(href=`{{ this }}`)
svg
// The SVG code of teh Facebook icon ...
+AreStringsEqual--HandlebarsHelper("@key", "instagram")
a(href=`{{ this }}`)
svg
// The SVG code of teh Instagram icon ...
+AreStringsEqual--HandlebarsHelper("@key", "twitter")
a(href=`{{ this }}`)
svg
// The SVG code of teh Twitter icon ...
Output (manually formatted):
<dl>
<dt>Full Name</dt>
<dd>{{ fullName }}</dd>
{{#isNonEmptyObject socialNetworkProfilesURIs}}
<dt>Social networks</dt>
<dd>
<ul>
{{#each socialNetworkProfilesURIs}}
<li>
{{#areStringsEqual @key "facebook"}}
<a href="{{ this }}">
<svg>
<!-- The SVG code of teh Facebook icon ... -->
</svg>
</a>
{{/areStringsEqual}}
{{#areStringsEqual @key "instagram"}}
<a href="{{ this }}">
<svg>
<!-- The SVG code of teh Instagram icon ...-->
</svg>
</a>
{{/areStringsEqual}}
{{#areStringsEqual @key "twitter"}}
<a href="{{ this }}">
<svg>
<!-- The SVG code of teh Twitter icon ...-->
</svg>
</a>
{{/areStringsEqual}}
</li>
{{/each}}
</ul>
</dd>
{{/isNonEmptyObject}}
</dl>
FAQs
Pug mixins for the outputting of the Handlebars code instead of plain HTML.
We found that handlebars-by-pug demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.