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

js-mvc-framework

Package Overview
Dependencies
Maintainers
0
Versions
65
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

js-mvc-framework - npm Package Compare versions

Comparing version 1.3.9 to 1.3.10

demonstrament/documents/test/schema/tests/testC.js

13

demonstrament/documents/test/schema/index.js

@@ -9,9 +9,7 @@ import * as Logs from "../coutil/logs/index.js"

Validate Property: Literals
Property Value Type: Boolean
Property Value Type: Number
- Range Validator
Property Value Type: String
- Enum Validator
- Length Validator
Property Value Type: undefined
Property Value Type: Boolean (Test A)
Property Value Type: Number - Range Validator (Test B)
Property Value Type: String - Length Validator (Test C)
Property Value Type: Enum Validator (Test D)
Property Value Type: undefined (Test E)
*/

@@ -23,3 +21,2 @@ const validation = {}

console.log($testName, tests[$testName])
// Logs.testResultsLog($test.execute())
}

@@ -26,0 +23,0 @@

import testA from './testA.js'
import testB from './testB.js'
import testC from './testC.js'
import testD from './testD.js'
export {
testA,
testB,
testC,
testD,
}

@@ -6,3 +6,3 @@ import { Schema, Coutil } from '/dependencies/mvc-framework.js'

group: "Validate Property: Literals",
name: "Property Value Type: Number",
name: "Property Value Type: Number - Range Validator",
descript: `When schema property type is number validate only content property values that are numbers.`,

@@ -9,0 +9,0 @@ method: function() {

@@ -18,3 +18,3 @@ import Validator from '../../Validator/index.js'

})
verification.valuate = enumeration.includes($value)
verification.pass = enumeration.includes($value)
return verification

@@ -21,0 +21,0 @@ },

@@ -11,3 +11,2 @@ import Validator from '../../Validator/index.js'

validate: ($context, $key, $value) => {
const { minLength, maxLength } = $context
const verification = new Verification({

@@ -20,12 +19,13 @@ context: $context,

let pass
if(minLength !== undefined) {
verification.minLength = minLength
const validMinLength = ($value.length >= minLength)
if(pass !== false) pass = validMinLength
if(typeof $value !== 'string') { pass = false }
else {
const { minLength, maxLength } = $context
let validMin, validMax
if(minLength !== undefined) { validMin = ($value.length >= minLength) }
else { validMin = true }
if(maxLength !== undefined) { validMax = ($value.length <= maxLength) }
else { validMax = true }
if(validMin && validMax) { pass = true }
else { pass = false}
}
if(maxLength !== undefined) {
verification.maxLength = maxLength
const validMaxLength = ($value.length <= maxLength)
if(pass !== false) pass = validMaxLength
}
verification.pass = pass

@@ -32,0 +32,0 @@ return verification

@@ -7,3 +7,2 @@ import Validator from '../../Validator/index.js'

export default class MatchValidator extends Validator {
#settings
constructor($settings = {}) {

@@ -10,0 +9,0 @@ super(Object.assign($settings, {

{
"name": "js-mvc-framework",
"author": "Thomas Patrick Welborn",
"version": "1.3.9",
"version": "1.3.10",
"type": "module",

@@ -6,0 +6,0 @@ "scripts": {

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

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