Signed-off-by: Traxus <shyidx@gmail.com>

This commit is contained in:
Traxus 2023-04-21 20:36:31 -04:00
parent 01f7081476
commit 0b762522ac

View File

@ -173,7 +173,7 @@ function jsonFilePathIsValid(filePath : string) {
return true;
}
function jsonNodeExists(jsonData : object, node : string) {
function jsonNodeExists(jsonData : any, node : string) {
//-----this condition is unneccessary... so THATS what typescript is for XD
//if (typeof node === 'string' || node instanceof String) {
@ -185,7 +185,7 @@ function jsonNodeExists(jsonData : object, node : string) {
return false;
}
function jsonNodesExist(jsonData : object, nodes : string[]) {
function jsonNodesExist(jsonData : any, nodes : any) {
//-----permit basic validation of the json we are trying to spit out by checking for existence of first order nodes
let node = '';
@ -195,7 +195,7 @@ function jsonNodesExist(jsonData : object, nodes : string[]) {
for (let i = 0; i < nodes.length; i++) {
node = nodes[i];
if (typeof node === 'string' || node instanceof String) {
if (typeof node === 'string') {
//-----string means that PRIMARY node must exist... no checking for children etc...
if (jsonNodeExists(jsonData, node) === false) {
return false;