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

@expandorg/validation

Package Overview
Dependencies
Maintainers
3
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@expandorg/validation - npm Package Compare versions

Comparing version 0.2.4 to 0.2.5

4

package.json
{
"name": "@expandorg/validation",
"version": "0.2.4",
"version": "0.2.5",
"description": "Expand UI validation library",

@@ -19,3 +19,3 @@ "main": "index.js",

},
"gitHead": "b6fed2baf6724c76051ae84f7ffc3d1e6edf3616"
"gitHead": "14a9fc49f391eebb06f22532147de5abda332ff9"
}

@@ -12,4 +12,38 @@ // @flow

isRequiredArray: (value: any) => !!value && value.length > 0,
isMinCharacterCount: (value: any, min: number) => {
if (typeof value !== 'string') {
return false;
}
return value.length >= min;
},
isMaxCharacterCount: (value: any, max: number) => {
if (typeof value !== 'string') {
return false;
}
return value.length <= max;
},
isGreater: (value: any, b: number) => {
const v = +value;
return v > b;
},
isGreaterOrEqual: (value: any, a: number) => {
if (!rules.isNumber(value)) {
return false;
}
return +value >= a;
},
isLess: (value: any, a: number) => {
if (!rules.isNumber(value)) {
return false;
}
return +value < a;
},
isLessOrEqual: (value: any, a: number) => {
if (!rules.isNumber(value)) {
return false;
}
return +value <= a;
},
};
export default rules;
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