js-mvc-framework
Advanced tools
Comparing version 1.3.11 to 1.3.12
@@ -11,2 +11,3 @@ export default class Test extends EventTarget { | ||
get id() { return this.#settings.id } | ||
get groupID() { return this.#settings.groupID } | ||
get name() { return this.#settings.name } | ||
@@ -13,0 +14,0 @@ get group() { return this.#settings.group } |
@@ -6,38 +6,22 @@ import * as Logs from "../coutil/logs/index.js" | ||
const { expandTree } = Coutil | ||
/* | ||
Validate Property: Literals | ||
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) | ||
*/ | ||
const validation = {} | ||
const tests = {} | ||
for(const [$testName, $testSettings] of Object.entries(Tests)) { | ||
tests[$testName] = new Test($testSettings).execute() | ||
console.log($testName, tests[$testName]) | ||
} | ||
/* | ||
Validation: Monodimensional Properties | ||
Validation Type: Object | ||
Validation Type: Primitive | ||
*/ | ||
/* | ||
Validation Multidimensional Properties | ||
Validation Type: Object | ||
Validation Type: Primitive | ||
*/ | ||
/* | ||
Validation: Property Validity | ||
Defined Properties: Valid | ||
Defined Properties: Nonvalid | ||
Defined Properties: Unvalid | ||
Defined Properties: Valid/Nonvalid/Unvalid | ||
Defined Properties: Complete Properties | ||
Defined Properties: Incomplete Properties | ||
*/ | ||
iterateTestGroups: | ||
for(const [$testGroupID, $testGroup] of Object.entries(Tests)) { | ||
console.log( | ||
"\n", "-----", | ||
) | ||
tests[$testGroupID] = {} | ||
iterateTests: | ||
for(const [$testID, $testSettings] of Object.entries($testGroup)) { | ||
const test = new Test($testSettings).execute() | ||
tests[$testGroupID][$testID] = test | ||
console.log( | ||
"\n", [test.groupID, test.id].join("."), | ||
"\n", ["pass", test.pass].join(" "), | ||
"\n", test.group, | ||
"\n", test.name, | ||
"\n", test | ||
) | ||
} | ||
} |
@@ -1,12 +0,23 @@ | ||
import testA from './testA.js' | ||
import testB from './testB.js' | ||
import testC from './testC.js' | ||
import testD from './testD.js' | ||
import testE from './testE.js' | ||
import * as groupA from './groupA/index.js' | ||
import * as groupB from './groupB/index.js' | ||
/* | ||
Validation Multidimensional Properties | ||
Validation Type: Object | ||
Validation Type: Primitive | ||
*/ | ||
/* | ||
Validation: Property Validity | ||
Defined Properties: Valid | ||
Defined Properties: Nonvalid | ||
Defined Properties: Unvalid | ||
Defined Properties: Valid/Nonvalid/Unvalid | ||
Defined Properties: Complete Properties | ||
Defined Properties: Incomplete Properties | ||
*/ | ||
export { | ||
// testA, | ||
// testB, | ||
// testC, | ||
// testD, | ||
testE, | ||
// groupA, | ||
groupB | ||
} |
@@ -6,3 +6,3 @@ import typedObjectLiteral from "../typedObjectLiteral/index.js" | ||
const retainValue = $treeNode[$retainKey] | ||
if(typeof retainValue === 'object') { | ||
if(retainValue && typeof retainValue === 'object') { | ||
tree[$treeKey] = impandTree(retainValue, $retainKey) | ||
@@ -22,3 +22,3 @@ } | ||
const retainValue = $treeNode | ||
if(typeof retainValue === 'object') { | ||
if(retainValue && typeof retainValue === 'object') { | ||
tree[$treeKey] = Object.assign({ | ||
@@ -25,0 +25,0 @@ [$retainKey]: expandTree(retainValue, $retainKey, $altKeys) |
@@ -8,3 +8,2 @@ import { typeOf, typedObjectLiteral } from '../../Coutil/index.js' | ||
} from './Validators/index.js' | ||
import { Types, Primitives, Objects } from './Variables/index.js' | ||
import Options from './Options/index.js' | ||
@@ -52,7 +51,9 @@ const ValidatorKeys = { | ||
// Context Value: Object | ||
else if(typeof $contextValue.type === 'object') { | ||
else if( | ||
typeof $contextValue.type === 'object' && $contextValue.type | ||
) { | ||
this.#_context[$contextKey] = new Schema($contextValue.type, this.options) | ||
continue iterateProperties | ||
} | ||
// Context Value: Primitive | ||
// Context Value: Primitive, Null | ||
else { | ||
@@ -59,0 +60,0 @@ this.#_context[$contextKey] = $contextValue |
import Validator from '../../Validator/index.js' | ||
import Verification from '../../Verification/index.js' | ||
import { Primitives, Objects } from '../../Variables/index.js' | ||
import Schema from '../../index.js' | ||
@@ -5,0 +4,0 @@ |
@@ -24,7 +24,8 @@ import { typeOf } from '../../../../Coutil/index.js' | ||
let pass | ||
const typeOfContextVal = ($context.type === undefined) | ||
? typeof $context.type | ||
const typeOfContextVal = ( | ||
$context.type === undefined || $context.type === null | ||
) ? typeOf($context.type) | ||
: typeOf($context.type()) | ||
const typeOfContentVal = typeOf($value) | ||
if(typeOfContentVal === 'undefined') { pass = false} | ||
if(typeOfContentVal === 'undefined') { pass = false } | ||
else if(typeOfContextVal === 'undefined') { pass = true } | ||
@@ -31,0 +32,0 @@ else { |
@@ -6,2 +6,3 @@ const Primitives = { | ||
'undefined': undefined, | ||
'null': null, | ||
} | ||
@@ -11,3 +12,2 @@ const Objects = { | ||
'array': Array, | ||
'null': null, | ||
} | ||
@@ -14,0 +14,0 @@ const Types = Object.assign({}, Primitives, Objects) |
{ | ||
"name": "js-mvc-framework", | ||
"author": "Thomas Patrick Welborn", | ||
"version": "1.3.11", | ||
"version": "1.3.12", | ||
"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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1822451
224
15167