New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@ssense/restify-request-validator

Package Overview
Dependencies
Maintainers
10
Versions
28
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ssense/restify-request-validator - npm Package Compare versions

Comparing version 1.1.11 to 1.1.12

.nyc_output/61f849a9b22035719b26c4099754f2f6.json

1

js/index.js

@@ -5,4 +5,5 @@ "use strict";

}
Object.defineProperty(exports, "__esModule", { value: true });
__export(require("./RequestValidator"));
__export(require("./ParamValidation"));
//# sourceMappingURL=index.js.map
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var ParamValidation = (function () {

@@ -3,0 +4,0 @@ function ParamValidation() {

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var ParamValidation_1 = require("./ParamValidation");

@@ -212,3 +213,10 @@ var supportedTypes = ['string', 'number', 'boolean', 'numeric', 'date', 'array', 'object'];

}
else if (typeValidation.type === 'numeric' || typeValidation.type === 'number') {
else if (typeValidation.type === 'numeric') {
var isNumeric = !(typeValidation.value.length === 0) && !isNaN(typeValidation.value);
if (isNumeric === true) {
typeValidation.value = parseInt(typeValidation.value, 10);
}
return isNumeric;
}
else if (typeValidation.type === 'number') {
var isNumeric = !isNaN(typeValidation.value);

@@ -221,3 +229,7 @@ if (isNumeric === true) {

else if (typeValidation.type === 'boolean') {
return ['0', '1', 'false', 'true', false, true, 0, 1].indexOf(typeValidation.value) !== -1;
var isBoolean = ['0', '1', 'false', 'true', false, true, 0, 1].indexOf(typeValidation.value) !== -1;
if (isBoolean === true) {
typeValidation.value = ['1', 'true', true, 1].indexOf(typeValidation.value) !== -1;
}
return isBoolean;
}

@@ -224,0 +236,0 @@ else if (typeValidation.type === 'date') {

2

package.json
{
"name": "@ssense/restify-request-validator",
"version": "1.1.11",
"version": "1.1.12",
"description": "Restify requests validator",

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

@@ -142,3 +142,3 @@ # Restify request validator

By default, every `numeric` and `date` inputs will be automatically transformed respectively to valid `number` and `Date` objects after validation. So you can directly use valid objects in your code.
By default, every `numeric`, `date` and `boolean` inputs will be automatically transformed respectively to valid `number`, `Date` and `boolean` objects after validation. So you can directly use valid objects in your code.

@@ -145,0 +145,0 @@ ##### Extra formatting, data transformation

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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