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

fh-forms

Package Overview
Dependencies
Maintainers
1
Versions
178
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fh-forms - npm Package Compare versions

Comparing version 0.5.9 to 0.5.10

27

lib/common/forms-rule-engine.js

@@ -1330,11 +1330,28 @@ (function () {

function numericalComparison(condition, fieldValue, testValue){
var fieldValNum = parseInt(fieldValue, 10);
var testValNum = parseInt(testValue, 10);
if(isNaN(fieldValNum) || isNaN(testValNum)){
return false;
}
if ("is equal to" === condition) {
return fieldValNum === testValNum;
} else if ("is less than" === condition) {
return fieldValNum < testValNum;
} else if ("is greater than" === condition) {
return fieldValNum > testValNum;
} else {
return false;
}
}
var valid = true;
if ("is equal to" === condition) {
valid = fieldValue === testValue;
valid = numericalComparison("is equal to", fieldValue, testValue);
} else if ("is greater than" === condition) {
// TODO - do numeric checking
valid = fieldValue > testValue;
valid = numericalComparison("is greater than", fieldValue, testValue);
} else if ("is less than" === condition) {
// TODO - do numeric checking
valid = fieldValue < testValue;
valid = numericalComparison("is less than", fieldValue, testValue);
} else if ("is at" === condition) {

@@ -1341,0 +1358,0 @@ valid = false;

2

package.json
{
"name": "fh-forms",
"version": "0.5.9",
"version": "0.5.10",
"description": "Cloud Forms API for form submission",

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

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

0.5.9-40
0.5.10-70
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