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

h3lp

Package Overview
Dependencies
Maintainers
1
Versions
108
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

h3lp - npm Package Compare versions

Comparing version 0.1.9 to 0.1.10

18

manager/validator.d.ts
export declare class Validator {
private reInt;
private reDecimal;
private reString;
private reAlphanumeric;

@@ -25,13 +24,12 @@ private reDate;

isTime(value: any): boolean;
isBooleanFormat(value: any): boolean;
isNumberFormat(value: any): boolean;
isIntegerFormat(value: any): boolean;
isDecimalFormat(value: any): boolean;
isStringFormat(value: any): boolean;
isAlphanumeric(value: any): boolean;
isDateFormat(value: any): boolean;
isDateTimeFormat(value: any): boolean;
isTimeFormat(value: any): boolean;
isBooleanFormat(value: string): boolean;
isNumberFormat(value: string): boolean;
isIntegerFormat(value: string): boolean;
isDecimalFormat(value: string): boolean;
isAlphanumeric(value: string): boolean;
isDateFormat(value: string): boolean;
isDateTimeFormat(value: string): boolean;
isTimeFormat(value: string): boolean;
between(value: any, from: any, to: any): boolean;
includes(list: any[] | string, value: any): boolean;
}

@@ -8,4 +8,2 @@ "use strict";

this.reDecimal = /^[0-9]*[.][0-9]+$/; // /^\d+\.\d+$/
// TODO: string, unlike alphanumeric, must consider all the characters that can go in a string, including special characters
this.reString = /[a-zA-Z0-9_.]+$/;
this.reAlphanumeric = /[a-zA-Z0-9_.]+$/;

@@ -93,5 +91,2 @@ this.reDate = /^\d{4}-\d{2}-\d{2}$/;

}
isStringFormat(value) {
return this.reString.test(value);
}
isAlphanumeric(value) {

@@ -98,0 +93,0 @@ return this.reAlphanumeric.test(value);

{
"name": "h3lp",
"version": "0.1.9",
"version": "0.1.10",
"description": "Helper for nodeJs",

@@ -5,0 +5,0 @@ "author": "Flavio Lionel Rita <flaviolrita@hotmail.com>",

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