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

egg-controller

Package Overview
Dependencies
Maintainers
1
Versions
86
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

egg-controller - npm Package Compare versions

Comparing version 0.3.30 to 0.3.31

4

History.md

@@ -0,1 +1,5 @@

# 0.3.31 / 2019-10-09
- fix: parameter data to schema.
# 0.3.30 / 2019-09-03

@@ -2,0 +6,0 @@

@@ -46,2 +46,12 @@ "use strict";

function convertValidateToSchema(validateType) {
if (validateType === 'string') {
return {
type: 'string',
};
}
if (validateType === 'int' || validateType === 'number') {
return {
type: 'number',
};
}
if (validateType.type === 'object' && validateType.rule) {

@@ -51,4 +61,5 @@ let properties = {};

Object.keys(validateType.rule).forEach(key => {
properties[key] = convertValidateToSchema(validateType.rule[key]);
if (validateType.rule[key].required) {
const rule = validateType.rule[key];
properties[key] = convertValidateToSchema(rule);
if (rule.required !== false) {
required.push(key);

@@ -71,3 +82,3 @@ }

? validateType.itemType === 'object'
? convertValidateToSchema(validateType.rule)
? convertValidateToSchema({ type: 'object', rule: validateType.rule })
: { type: validateType.itemType }

@@ -74,0 +85,0 @@ : undefined,

2

package.json
{
"name": "egg-controller",
"version": "0.3.30",
"version": "0.3.31",
"description": "controller for egg.",

@@ -5,0 +5,0 @@ "main": "lib/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