diff --git a/index.ts b/index.ts index 2343aac..8c0f4bf 100644 --- a/index.ts +++ b/index.ts @@ -2,7 +2,6 @@ export * from "./src/Core/Interfaces"; export * from "./src/Core/SendCoin"; export * from "./src/Core/Types"; export * from "./src/Core/API/Names"; -export * from "./src/Core/API/QortalRequest"; export * from "./src/Core/API/Transactions"; export * from "./src/Numbers/Colors"; export * from "./src/Numbers/NumberConversion"; diff --git a/src/Core/API/QortalRequest.ts b/src/Core/API/QortalRequest.ts deleted file mode 100644 index e69de29..0000000 diff --git a/src/Strings/printFunctions.ts b/src/Strings/printFunctions.ts index 34732b4..5b12a4c 100644 --- a/src/Strings/printFunctions.ts +++ b/src/Strings/printFunctions.ts @@ -1,4 +1,20 @@ +export const objectIsNull = (variable: object) => { + return Object.is(variable, null); +}; +export const objectIsUndefined = (variable: object) => { + return Object.is(variable, undefined); +}; + export const printVar = (variable: object) => { + if (objectIsNull(variable)) { + console.log("variable is NULL"); + return; + } + if (objectIsUndefined(variable)) { + console.log("variable is UNDEFINED"); + return; + } + const [key, value] = Object.entries(variable)[0]; console.log(key, " is: ", value); };