fix(core): update
This commit is contained in:
		| @@ -3,6 +3,6 @@ | |||||||
|  */ |  */ | ||||||
| export const commitinfo = { | export const commitinfo = { | ||||||
|   name: '@pushrocks/smartvalidator', |   name: '@pushrocks/smartvalidator', | ||||||
|   version: '1.0.3', |   version: '1.0.4', | ||||||
|   description: 'a wrapper for the validator package to perform validations' |   description: 'a wrapper for the validator package to perform validations' | ||||||
| } | } | ||||||
|   | |||||||
							
								
								
									
										15
									
								
								ts/index.ts
									
									
									
									
									
								
							
							
						
						
									
										15
									
								
								ts/index.ts
									
									
									
									
									
								
							| @@ -12,4 +12,17 @@ export class SmartValidator { | |||||||
|   public escape(stringArg: string) { |   public escape(stringArg: string) { | ||||||
|     return plugins.validator.escape(stringArg); |     return plugins.validator.escape(stringArg); | ||||||
|   } |   } | ||||||
| } |  | ||||||
|  |   public isUrl(stringArg: string) { | ||||||
|  |     return plugins.validator.isURL(stringArg); | ||||||
|  |   } | ||||||
|  |  | ||||||
|  |   /** | ||||||
|  |    * might be buggy. TODO: Improve. | ||||||
|  |    * @param stringArg | ||||||
|  |    * @returns  | ||||||
|  |    */ | ||||||
|  |   public isCsv(stringArg: string) { | ||||||
|  |     return stringArg.split(',').length > 4 || stringArg.split(';').length > 4; | ||||||
|  |   } | ||||||
|  | } | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user