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.
check-data
Advanced tools
npm install check-data --save
let verify = Verify(data, options)
data
Objcte - 验证数据
options
Objcte - 验证数据表达式
verify.error
String - 错误信息
verify.data
Objcte - 验证数据
verify.group
Objcte - 数据分组
let data = {
"name": "测试",
"time": "2017-07-07T09:53:30.000Z",
"companyName": ["a.js", "b.js", "c.js"],
"multiple": ["a", "b", "c", "d"],
"money": 555,
"email": "abc@gmail.com"
}
let verify = Verify(data, {
"name": String,
"time": Date,
"companyName": [String],
"money": Number,
"multiple": [{
"type": String,
"allowNull": true,
"group": "filter",
}],
"email": {
"type": String,
"allowNull": true,
"group": "filter",
}
})
let data = {
"t0": false,
"t1": false,
"t2": true,
"t3": true,
"t4": false,
"t5": true,
"t6": true,
"t7": false,
"t8": true
}
let verify = Verify(data, {
$: {
type: Boolean,
allowNull: true,
}
})
let data = ["a.js", "b.js", "c.js"]
let verify = Verify(data, [String])
let data = {
"a": 0,
"b": 3,
}
let verify = Verify(data, {
a: {
type: Number,
"conversion": Boolean
},
b: {
type: Number,
"conversion": Boolean
}
})
// Returns {a:false,b:true}
let data = {
"id": "5968d3b4956fe04299ea5c18",
"mobilePhone": "18555555555"
}
let verify = Verify(data, {
id: {
"type": "ObjectId",
"mobilePhone": "MobilePhone"
}
})
FAQs
JS数据验证、转换递归器
The npm package check-data receives a total of 2 weekly downloads. As such, check-data popularity was classified as not popular.
We found that check-data 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.