
Security News
Another Round of TEA Protocol Spam Floods npm, But It’s Not a Worm
Recent coverage mislabels the latest TEA protocol spam as a worm. Here’s what’s actually happening.
npm
npm install jsx-parser
how to require
import JSXParser form 'index'
or
<script src="index.umd"></script
how to use
var str = '<div><div id={ 2222 } kkk={<div/>} class="{111}" >xxx{[1,2,3,4].map(function(el){ return <div ref=3 >{el}</div> })}22</div><div><div ref=111>{55}</div></div></div>'
// 用渲染函数构建虚拟模版类
var array = (new JSXParser(str)).parse()
console.log(JSON.stringify(array))
output
[
{
"type": "div",
"props": { },
"children": [
{
"type": "div",
"props": {
"id": {
"type": "#jsx",
"nodeValue": " 2222 "
},
"kkk": {
"type": "#jsx",
"nodeValue": [
{
"type": "div",
"props": { },
"children": [ ],
"isVoidTag": true
}
]
},
"class": "{111}"
},
"children": [
{
"type": "#text",
"nodeValue": "xxx"
},
{
"type": "#jsx",
"nodeValue": [
{
"type": "#jsx",
"nodeValue": "[1,2,3,4].map(function(el){ return "
},
{
"type": "div",
"props": {
"ref": "3"
},
"children": [
{
"type": "#jsx",
"nodeValue": "el"
}
]
},
{
"type": "#jsx",
"nodeValue": " })"
}
]
},
{
"type": "#text",
"nodeValue": "22"
}
]
},
{
"type": "div",
"props": { },
"children": [
{
"type": "div",
"props": {
"ref": "111"
},
"children": [
{
"type": "#jsx",
"nodeValue": "55"
}
]
}
]
}
]
}
]

var a = new JSXParser('<div id={22} class="ddd" {...{a:1,b:2}}>111</div>')
console.log(a)

FAQs
a simple jsx parser
The npm package jsx-parser receives a total of 567 weekly downloads. As such, jsx-parser popularity was classified as not popular.
We found that jsx-parser 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.

Security News
Recent coverage mislabels the latest TEA protocol spam as a worm. Here’s what’s actually happening.

Security News
PyPI adds Trusted Publishing support for GitLab Self-Managed as adoption reaches 25% of uploads

Research
/Security News
A malicious Chrome extension posing as an Ethereum wallet steals seed phrases by encoding them into Sui transactions, enabling full wallet takeover.