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

zpin-templates

Package Overview
Dependencies
Maintainers
1
Versions
29
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

zpin-templates - npm Package Compare versions

Comparing version 0.0.15 to 0.0.16

34

dist/reactTemplates.js

@@ -207,20 +207,20 @@ 'use strict';

//多class问题
// val=val.trim();
// if(val.indexOf("{this.styles.")<0){
// var arr=val.split(" ");
// var result="{[";
// arr.forEach(function (v,i) {
// if(classExclude.indexOf(v.trim())<0){
// result+="this.styles['"+v.trim()+"']";
// }else{
// result+="'"+v.trim()+"'";
// }
// if(i!=arr.length-1){
// result+=","
// }
// })
// result+="].join(' ')}"
// }
val = val.trim();
if (val.indexOf("{this.styles.") < 0) {
var arr = val.split(" ");
var result = "{[";
arr.forEach(function (v, i) {
if (classExclude.indexOf(v.trim()) < 0) {
result += "this.styles['" + v.trim() + "']";
} else {
result += v.trim();
}
if (i != arr.length - 1) {
result += ",";
}
});
result += "].join(' ')}";
}
// console.log(result);
props[propKey] = existing + utils.convertText(node, context, val.trim());
props[propKey] = existing + utils.convertText(node, context, result);
}

@@ -227,0 +227,0 @@ } else if (!_.startsWith(key, 'rt-')) {

{
"name": "zpin-templates",
"version": "0.0.15",
"version": "0.0.16",
"description": "Light weight templates for react -> write html get valid react code",

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

@@ -222,20 +222,20 @@ 'use strict';

//多class问题
// val=val.trim();
// if(val.indexOf("{this.styles.")<0){
// var arr=val.split(" ");
// var result="{[";
// arr.forEach(function (v,i) {
// if(classExclude.indexOf(v.trim())<0){
// result+="this.styles['"+v.trim()+"']";
// }else{
// result+="'"+v.trim()+"'";
// }
// if(i!=arr.length-1){
// result+=","
// }
// })
// result+="].join(' ')}"
// }
val=val.trim();
if(val.indexOf("{this.styles.")<0){
var arr=val.split(" ");
var result="{[";
arr.forEach(function (v,i) {
if(classExclude.indexOf(v.trim())<0){
result+="this.styles['"+v.trim()+"']";
}else{
result+=v.trim();
}
if(i!=arr.length-1){
result+=","
}
})
result+="].join(' ')}"
}
// console.log(result);
props[propKey] = existing + utils.convertText(node, context,val.trim());
props[propKey] = existing + utils.convertText(node, context,result);
}

@@ -242,0 +242,0 @@ } else if (!_.startsWith(key, 'rt-')) {

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