mirror of
https://github.com/LaconicNetwork/laconic.com.git
synced 2026-03-01 03:04:08 +00:00
Signed-off-by: Traxus <shyidx@gmail.com>
This commit is contained in:
parent
01f7081476
commit
0b762522ac
@ -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;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user