🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

egg-http-parameter

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

egg-http-parameter - npm Package Compare versions

Comparing version
1.0.6
to
1.0.7
+8
-2
lib/validator.js

@@ -97,4 +97,10 @@

conver:function(value,rule) {
if(!value || !value.trim()){
return
}
const val = moment(value,rule.format || 'YYYY-MM-DD HH:mm:ss')
return rule.moment ? val : (val.isValid() ? val.toDate() : null)
if(!val.isValid()){
return
}
return rule.moment ? val : val.toDate()
}

@@ -125,3 +131,3 @@ }

conver:function(value,rule) {
return Number(value)
return parseInt(value,rule.radix)
}

@@ -128,0 +134,0 @@ }

+5
-6
{
"name": "egg-http-parameter",
"version": "1.0.6",
"version": "1.0.7",
"description": "",

@@ -14,3 +14,3 @@ "eggPlugin": {

"dependencies": {
"moment": "^2.18.1"
"moment": "^2.22.1"
},

@@ -42,7 +42,6 @@ "devDependencies": {

"files": [
"app",
"config",
"app.js",
"agent.js",
"config",
"lib",
"app"
"lib"
],

@@ -49,0 +48,0 @@ "ci": {