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

check-data

Package Overview
Dependencies
Maintainers
1
Versions
75
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

check-data - npm Package Compare versions

Comparing version 1.2.3 to 1.2.4

52

index.js

@@ -401,18 +401,16 @@ let validator = require('validator')

// 自定义方法
if (handler.methods) {
for (let path in handler.methods) {
let data = output.data
let pathArray = path.split('.')
for (let key of pathArray) {
if (data[key]) {
data = data[key]
} else {
data = undefined
break
// 分组导出参数至指定对象
if (handler.group) {
let data = output.data
for (let name in handler.group) {
// 对象不存在时自动创建
if (!output[name]) {
output[name] = {}
}
let groupArray = handler.group[name]
for (let path of groupArray) {
if (data[path]) {
output[name][path] = data[path]
}
}
if (data !== undefined) {
handler.methods[path].call(output, data)
}
}

@@ -457,16 +455,18 @@ }

// 分组导出参数至指定对象
if (handler.group) {
let data = output.data
for (let name in handler.group) {
// 对象不存在时自动创建
if (!output[name]) {
output[name] = {}
}
let groupArray = handler.group[name]
for (let path of groupArray) {
if (data[path]) {
output[name][path] = data[path]
// 自定义方法
if (handler.methods) {
for (let path in handler.methods) {
let data = output.data
let pathArray = path.split('.')
for (let key of pathArray) {
if (data[key]) {
data = data[key]
} else {
data = undefined
break
}
}
if (data !== undefined) {
handler.methods[path].call(output, data)
}
}

@@ -473,0 +473,0 @@ }

{
"name": "check-data",
"version": "1.2.3",
"version": "1.2.4",
"description": "JS数据验证器",

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

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