New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

yog-swig

Package Overview
Dependencies
Maintainers
3
Versions
32
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

yog-swig - npm Package Compare versions

Comparing version 0.0.8 to 0.0.9

4

index.js

@@ -31,2 +31,4 @@ /**

api.addPagelet({
'for': attr['for'],
model: attr.model,
id: attr.id,

@@ -45,3 +47,3 @@ mode: attr.mode,

return '<div id="' + attr.id + '"></div>';
return attr['for'] ? '' : '<div id="' + attr.id + '"></div>';
};

@@ -48,0 +50,0 @@ }

{
"name": "yog-swig",
"version": "0.0.8",
"version": "0.0.9",
"description": "custom swig template, add some tag or filter ",

@@ -5,0 +5,0 @@ "main": "index.js",

var ignore = 'ignore',
missing = 'missing',
only = 'only',
id = "id",
group = "group",
mode = "mode";
attrs = ["id", "mode", "group", "for", "model"];

@@ -60,2 +58,3 @@ /**

var file, w, k;
parser.on(types.STRING, function(token) {

@@ -74,4 +73,4 @@

if (k == id || k == group || k == mode) {
out.v = token.match.replace(/^['"]|['"]$/g, '');
if (~attrs.indexOf(k)) {
out.v = token.match.replace(/^("|')?(.*)\1$/g, '$2');
out.k = k;

@@ -91,3 +90,3 @@ this.out.push(out);

if (token.match === id) {
if (~attrs.indexOf(token.match)) {
k = token.match;

@@ -97,12 +96,2 @@ return false;

if (token.match === mode) {
k = token.match;
return false;
}
if (token.match === group) {
k = token.match;
return false;
}
if (!w && token.match === 'with') {

@@ -109,0 +98,0 @@ w = true;

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